From 2d27bdcd640759a5fb1b48125fee7280adad95f7 Mon Sep 17 00:00:00 2001 From: Chris Dawkins Date: Sat, 23 Sep 2023 16:56:48 -0600 Subject: [PATCH] direnv: fix nushell syntax With nushell `0.85.0` this is no longer valid syntax. This change fixes the syntax error with `0.85.0` while still remaining valid for `0.84.0` and earlier. --- modules/programs/direnv.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/programs/direnv.nix b/modules/programs/direnv.nix index 23636644..fd3f3684 100644 --- a/modules/programs/direnv.nix +++ b/modules/programs/direnv.nix @@ -134,7 +134,7 @@ in { $env.config = ($env.config | update hooks.pre_prompt ($env.config.hooks.pre_prompt | append { code: " let direnv = (${pkgs.direnv}/bin/direnv export json | from json) - let direnv = if ($direnv | length) == 1 { $direnv } else { {} } + let direnv = if not ($direnv | is-empty) { $direnv } else { {} } $direnv | load-env " }))