1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-21 06:55:39 +00:00

Revert change in tramp-adb-send-command

* lisp/net/tramp-adb.el (tramp-adb-send-command): Revert check for
`tramp-androidsu-method'.  There is no need to restrict the check.
This commit is contained in:
Michael Albinus 2024-02-28 16:31:25 +01:00
parent 1ddd9c8e29
commit e490d2f872

View File

@ -1114,9 +1114,7 @@ error and non-nil on success."
(defun tramp-adb-send-command (vec command &optional neveropen nooutput) (defun tramp-adb-send-command (vec command &optional neveropen nooutput)
"Send the COMMAND to connection VEC." "Send the COMMAND to connection VEC."
(if (and (equal (tramp-file-name-method vec) (if (string-match-p (rx multibyte) command)
tramp-androidsu-method)
(string-match-p (rx multibyte) command))
;; Multibyte codepoints with four bytes are not supported at ;; Multibyte codepoints with four bytes are not supported at
;; least by toybox. ;; least by toybox.
@ -1148,8 +1146,8 @@ error and non-nil on success."
(while (search-forward-regexp (rx (+ "\r") eol) nil t) (while (search-forward-regexp (rx (+ "\r") eol) nil t)
(replace-match "" nil nil))))))) (replace-match "" nil nil)))))))
(defun tramp-adb-send-command-and-check (vec command &optional exit-status (defun tramp-adb-send-command-and-check
command-augmented-p) (vec command &optional exit-status command-augmented-p)
"Run COMMAND and check its exit status. "Run COMMAND and check its exit status.
Sends `echo $?' along with the COMMAND for checking the exit Sends `echo $?' along with the COMMAND for checking the exit
status. If COMMAND is nil, just sends `echo $?'. Returns nil if status. If COMMAND is nil, just sends `echo $?'. Returns nil if
@ -1162,7 +1160,8 @@ Optional argument EXIT-STATUS, if non-nil, triggers the return of
the exit status." the exit status."
(tramp-adb-send-command (tramp-adb-send-command
vec (if command vec (if command
(if command-augmented-p command (if command-augmented-p
command
(format "%s; echo tramp_exit_status $?" command)) (format "%s; echo tramp_exit_status $?" command))
"echo tramp_exit_status $?")) "echo tramp_exit_status $?"))
(with-current-buffer (tramp-get-connection-buffer vec) (with-current-buffer (tramp-get-connection-buffer vec)