]> git.eshelyaron.com Git - emacs.git/commitdiff
Revert change in tramp-adb-send-command
authorMichael Albinus <michael.albinus@gmx.de>
Wed, 28 Feb 2024 15:31:25 +0000 (16:31 +0100)
committerEshel Yaron <me@eshelyaron.com>
Wed, 28 Feb 2024 17:54:05 +0000 (18:54 +0100)
* lisp/net/tramp-adb.el (tramp-adb-send-command): Revert check for
`tramp-androidsu-method'.  There is no need to restrict the check.

(cherry picked from commit e490d2f8724c5e47d83c40c388f60e84f541dae5)

lisp/net/tramp-adb.el

index 3f216ba403ae04fa851c6202ee2be38d6711b6c3..8ad7c271b4fe182d28e9b7bf280878fddd28b261 100644 (file)
@@ -1114,9 +1114,7 @@ error and non-nil on success."
 
 (defun tramp-adb-send-command (vec command &optional neveropen nooutput)
   "Send the COMMAND to connection VEC."
-  (if (and (equal (tramp-file-name-method vec)
-                  tramp-androidsu-method)
-           (string-match-p (rx multibyte) command))
+  (if (string-match-p (rx multibyte) command)
       ;; Multibyte codepoints with four bytes are not supported at
       ;; least by toybox.
 
@@ -1148,8 +1146,8 @@ error and non-nil on success."
          (while (search-forward-regexp (rx (+ "\r") eol) nil t)
            (replace-match "" nil nil)))))))
 
-(defun tramp-adb-send-command-and-check (vec command &optional exit-status
-                                             command-augmented-p)
+(defun tramp-adb-send-command-and-check
+    (vec command &optional exit-status command-augmented-p)
   "Run COMMAND and check its exit status.
 Sends `echo $?' along with the COMMAND for checking the exit
 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."
   (tramp-adb-send-command
    vec (if command
-          (if command-augmented-p command
+          (if command-augmented-p
+               command
              (format "%s; echo tramp_exit_status $?" command))
         "echo tramp_exit_status $?"))
   (with-current-buffer (tramp-get-connection-buffer vec)