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

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

[nongnu] elpa/why-this ca4cf46d6e 40/59: Don't error on nonexistant pare


From: ELPA Syncer
Subject: [nongnu] elpa/why-this ca4cf46d6e 40/59: Don't error on nonexistant parent directory
Date: Sun, 27 Nov 2022 16:02:53 -0500 (EST)

branch: elpa/why-this
commit ca4cf46d6e7b961a0c0fa39ac084fdca3c8c93b2
Author: Akib Azmain Turja <akib@disroot.org>
Commit: Akib Azmain Turja <akib@disroot.org>

    Don't error on nonexistant parent directory
---
 why-this.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/why-this.el b/why-this.el
index aa1602d466..f2cbfbec1e 100644
--- a/why-this.el
+++ b/why-this.el
@@ -713,6 +713,7 @@ Do CMD with ARGS."
   (pcase cmd
     ('supported-p
      (and (buffer-file-name)
+          (file-exists-p (file-name-directory (buffer-file-name)))
           (string= "true\n" (shell-command-to-string
                              (format "%s rev-parse --is-inside-work-tree"
                                      (shell-quote-argument
@@ -805,6 +806,7 @@ Do CMD with ARGS."
   (pcase cmd
     ('supported-p
      (and (buffer-file-name)
+          (file-exists-p (file-name-directory (buffer-file-name)))
           (string= "t" (shell-command-to-string
                         (format "%s annotate \"%s\" --template \"t\""
                                 (shell-quote-argument why-this-hg-program)



reply via email to

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