about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--users/Profpatsch/lib.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/users/Profpatsch/lib.nix b/users/Profpatsch/lib.nix
index 9dd3cd481d7e..db81c2dfe321 100644
--- a/users/Profpatsch/lib.nix
+++ b/users/Profpatsch/lib.nix
@@ -22,7 +22,10 @@ let
   ];
 
   eprintenv = depot.nix.writeExecline "eprintenv" { readNArgs = 1; } [
-    "fdmove" "-c" "1" "2" bins.printenv "$1" "$@"
+    "ifelse" [ "fdmove" "-c" "1" "2" bins.printenv "$1" ]
+    [ "$@" ]
+    "if" [ eprintf "eprintenv: could not find \"\${1}\" in the environment\n" ]
+    "$@"
   ];
 
   # remove everything but a few selected environment variables