]> git.eshelyaron.com Git - emacs.git/commitdiff
* net/tramp.el (tramp-handle-shell-command): Use "/bin/sh -c" for
authorMichael Albinus <michael.albinus@gmx.de>
Mon, 28 Jan 2008 21:25:26 +0000 (21:25 +0000)
committerMichael Albinus <michael.albinus@gmx.de>
Mon, 28 Jan 2008 21:25:26 +0000 (21:25 +0000)
the command.

lisp/ChangeLog
lisp/net/tramp.el

index 1e2dcf1e558b43dc9bb33d5d4bb2ee960eac476a..d467535a18638707e2b7355e527adf83ebe11a5c 100644 (file)
@@ -1,3 +1,8 @@
+2008-01-28  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp.el (tramp-handle-shell-command): Use "/bin/sh -c" for
+       the command.
+
 2008-01-28  Vinicius Jose Latorre  <viniciusjl@ig.com.br>
 
        * whitespace.el: Moved to obsolete dir.
index b9e6a279644c74844a1d960fa27fc2e5b95ef2fb..eb68c8302aaee8c8be3968a7092db32d71fa386e 100644 (file)
@@ -3781,7 +3781,9 @@ Lisp error raised when PROGRAM is nil is trapped also, returning 1."
   (command &optional output-buffer error-buffer)
   "Like `shell-command' for Tramp files."
   (let* ((asynchronous (string-match "[ \t]*&[ \t]*\\'" command))
-        (args (split-string (substring command 0 asynchronous) " "))
+        ;; We cannot use `shell-file-name' and `shell-command-switch',
+        ;; they are variables of the local host.
+        (args (list "/bin/sh" "-c" (substring command 0 asynchronous)))
         (output-buffer
          (cond
           ((bufferp output-buffer) output-buffer)