Sfoglia il codice sorgente

nixpkgs/elvish: move local import later

Thomas Dy 2 anni fa
parent
commit
f5be0cd060
1 ha cambiato i file con 9 aggiunte e 6 eliminazioni
  1. 9 6
      .config/nixpkgs/elvish/lib/config.elv

+ 9 - 6
.config/nixpkgs/elvish/lib/config.elv

@@ -2,12 +2,6 @@ use prompt
 use nix-shell
 use direlv
 
-# import local.elv if present, for example, from ~/.config/elvish/lib/local.elv
-try {
-  use local
-} catch e {
-}
-
 edit:add-var ls~ { |@a|
   e:ls --color=auto --group-directories-first -F --quoting-style literal $@a
 }
@@ -44,3 +38,12 @@ set edit:after-command = [{|m|
     printf "%s took %.3fs\n" $cmd $m[duration]
   }
 }]
+
+# import local.elv if present, for example, from ~/.config/elvish/lib/local.elv
+try {
+  use local
+} catch e {
+  if (not-eq $e[reason] "<unknown no such module: local>") {
+    fail $e
+  }
+}