emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/nix-mode abdeae0f23 276/500: Make sure nix-instantiate-exe


From: ELPA Syncer
Subject: [nongnu] elpa/nix-mode abdeae0f23 276/500: Make sure nix-instantiate-executable exists before running it
Date: Sat, 29 Jan 2022 08:27:13 -0500 (EST)

branch: elpa/nix-mode
commit abdeae0f23f99729664b533fcc5cc7125836b1cc
Author: Matthew Bauer <mjbauer95@gmail.com>
Commit: Matthew Bauer <mjbauer95@gmail.com>

    Make sure nix-instantiate-executable exists before running it
    
    Some users may not have nix-instantiate available in their
    environment. Fail silently in that case.
---
 nix-mode.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/nix-mode.el b/nix-mode.el
index 8d665f77dd..5e4cdef0ae 100644
--- a/nix-mode.el
+++ b/nix-mode.el
@@ -533,7 +533,8 @@ PARTS a list of regexps"
 If STR contains brackets, call nix-instantiate to find the
 location of STR. If nix-instantiate has a nonzero exit code,
 don’t do anything"
-  (when (string-match nix-re-bracket-path str)
+  (when (and (string-match nix-re-bracket-path str)
+             (executable-find nix-instantiate-executable))
     (with-temp-buffer
       (when (eq (call-process nix-instantiate-executable nil (current-buffer)
                               nil "--eval" "-E" str) 0)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]