]> git.eshelyaron.com Git - emacs.git/commitdiff
Print the correct $PATH when Eshell's 'which' fails to find a command
authorJim Porter <jporterbugs@gmail.com>
Thu, 15 Sep 2022 19:32:02 +0000 (12:32 -0700)
committerJim Porter <jporterbugs@gmail.com>
Tue, 18 Oct 2022 01:48:52 +0000 (18:48 -0700)
* lisp/eshell/esh-cmd.el (eshell/which): Use 'eshell-get-path'
(bug#20008).

lisp/eshell/esh-cmd.el

index c5ceb3ffd17d2866ca6187b69a57a1375aa173b1..4a41bbe8fa1a2de1af02776cc0d27ab1bcc1952a 100644 (file)
@@ -1274,8 +1274,9 @@ be finished later after the completion of an asynchronous subprocess."
                         name)
                   (eshell-search-path name)))))
       (if (not program)
-         (eshell-error (format "which: no %s in (%s)\n"
-                               name (getenv "PATH")))
+          (eshell-error (format "which: no %s in (%s)\n"
+                                name (string-join (eshell-get-path t)
+                                                  (path-separator))))
        (eshell-printn program)))))
 
 (put 'eshell/which 'eshell-no-numeric-conversions t)