]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix an error in tramp-sh-handle-make-process. Dont' merge with master
authorMichael Albinus <michael.albinus@gmx.de>
Fri, 23 Oct 2020 14:26:25 +0000 (16:26 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Fri, 23 Oct 2020 14:26:25 +0000 (16:26 +0200)
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Don't use heredoc
script whent the argument contains a string.

lisp/net/tramp-sh.el

index 7adfb49a858f759e5109d4458683b8c5ce5048ce..19d50fce4c5982663772c46ee47c1bba730b7b2b 100644 (file)
@@ -2863,8 +2863,10 @@ STDERR can also be a file name."
               ;; command.
               (heredoc (and (stringp program)
                             (string-match-p "sh$" program)
+                            (= (length args) 2)
                             (string-equal "-c" (car args))
-                            (= (length args) 2)))
+                            ;; Don't if there is a string.
+                            (not (string-match-p "'\\|\"" (cadr args)))))
               ;; When PROGRAM is nil, we just provide a tty.
               (args (if (not heredoc) args
                       (let ((i 250))