]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix tramp-sh-handle-make-process; don't merge with master
authorMichael Albinus <michael.albinus@gmx.de>
Sat, 24 Oct 2020 11:08:31 +0000 (13:08 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Sat, 24 Oct 2020 11:08:31 +0000 (13:08 +0200)
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Accept nil
COMMAND.  (Bug#44151)

* test/lisp/net/tramp-tests.el (tramp-test29-start-file-process):
Extend test.

lisp/net/tramp-sh.el
test/lisp/net/tramp-tests.el

index 19d50fce4c5982663772c46ee47c1bba730b7b2b..df6720b99b7e9709dedb40305bb09f0ef52ac81f 100644 (file)
@@ -2822,7 +2822,7 @@ STDERR can also be a file name."
          (signal 'wrong-type-argument (list #'stringp name)))
        (unless (or (null buffer) (bufferp buffer) (stringp buffer))
          (signal 'wrong-type-argument (list #'stringp buffer)))
-       (unless (consp command)
+       (unless (or (null command) (consp command))
          (signal 'wrong-type-argument (list #'consp command)))
        (unless (or (null coding)
                    (and (symbolp coding) (memq coding coding-system-list))
index fb4df639e5a82eac942c7b8127257fa9fd763266..cc9ccefb0df518e4361bff777233492899c23a33 100644 (file)
@@ -4282,6 +4282,21 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
            ;; echoes also the sent string.
            (should (string-match "\\`foo" (buffer-string))))
 
+       ;; Cleanup.
+       (ignore-errors (delete-process proc)))
+
+      ;; PTY.
+      (unwind-protect
+         (with-temp-buffer
+           (if (not (tramp--test-sh-p))
+               (should-error
+                (start-file-process "test4" (current-buffer) nil)
+                :type 'wrong-type-argument)
+             (setq proc (start-file-process "test4" (current-buffer) nil))
+             (should (processp proc))
+             (should (equal (process-status proc) 'run))
+             (should (stringp (process-tty-name proc)))))
+
        ;; Cleanup.
        (ignore-errors (delete-process proc))))))