]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/net/tramp.el (tramp-handle-make-process): Handle shell commands.
authorMichael Albinus <michael.albinus@gmx.de>
Fri, 18 Dec 2020 12:33:31 +0000 (13:33 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Fri, 18 Dec 2020 12:33:31 +0000 (13:33 +0100)
lisp/net/tramp.el

index a4865ec4f222b0e40c9e93bed4a3cee53a853a00..30818fe7e64c28deaf76714e53b27324f9a0b08e 100644 (file)
@@ -3790,6 +3790,15 @@ It does not support `:stderr'."
        (unless (or (null stderr) (bufferp stderr))
          (signal 'wrong-type-argument (list #'bufferp stderr)))
 
+       ;; Quote shell command.
+       (when (and (= (length command) 3)
+                  (stringp (nth 0 command))
+                  (string-match-p "sh$" (nth 0 command))
+                  (stringp (nth 1 command))
+                  (string-equal "-c" (nth 1 command))
+                  (stringp (nth 2 command)))
+         (setcar (cddr command) (tramp-shell-quote-argument (nth 2 command))))
+
        (let* ((buffer
                (if buffer
                    (get-buffer-create buffer)