branch: elpa/nix-mode
commit 07b6069c78c4bb6d2e244b1a0bd09e84b049f5ea
Author: Akira Komamura <[email protected]>
Commit: Akira Komamura <[email protected]>

    nix-flake: Fix an unexpected error in assert
    
    When two universal prefixes are given, DIR is nil, and
    `file-directory-p' threw an error. It must pass.
---
 nix-flake.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nix-flake.el b/nix-flake.el
index 0e07b07458..1f12f41c2a 100644
--- a/nix-flake.el
+++ b/nix-flake.el
@@ -416,7 +416,7 @@ whatever supported by Nix."
                            (list nil :flake-ref nix-flake-ref)
                          (user-error "Last flake is unavailable")))
                  (_ (list default-directory))))
-  (cl-assert (or (file-directory-p dir)
+  (cl-assert (or (and (stringp dir) (file-directory-p dir))
                  flake-ref)
              nil
              "DIR or FLAKE-REF must be specified")

Reply via email to