aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/net/tramp-sh.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index e008bc07301..3468ea060d7 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -4107,8 +4107,9 @@ This function expects to be in the right *tramp* buffer."
4107 vec (format "%s type -P %s 2>%s" 4107 vec (format "%s type -P %s 2>%s"
4108 (if dirlist (concat "PATH=" (string-join dirlist ":")) "") 4108 (if dirlist (concat "PATH=" (string-join dirlist ":")) "")
4109 progname (tramp-get-remote-null-device vec))) 4109 progname (tramp-get-remote-null-device vec)))
4110 (unless (zerop (buffer-size)) 4110 (goto-char (point-min))
4111 (string-trim (buffer-string))))) 4111 (when (search-forward-regexp "/" nil 'noerror)
4112 (string-trim (buffer-substring (match-beginning 0) (point-max))))))
4112 4113
4113;; On hydra.nixos.org, the $PATH environment variable is too long to 4114;; On hydra.nixos.org, the $PATH environment variable is too long to
4114;; send it. This is likely not due to PATH_MAX, but PIPE_BUF. We 4115;; send it. This is likely not due to PATH_MAX, but PIPE_BUF. We