1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-14 07:09:45 +01:00

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.
This commit is contained in:
Chris Dawkins 2023-09-23 16:56:48 -06:00 committed by Mikilio
parent 5e5063a9bd
commit 6c792aa57e
No known key found for this signature in database
GPG key ID: 5B2F1A890CF33F3F

View file

@ -134,7 +134,7 @@ in {
$env.config = ($env.config | update hooks.pre_prompt ($env.config.hooks.pre_prompt | append { $env.config = ($env.config | update hooks.pre_prompt ($env.config.hooks.pre_prompt | append {
code: " code: "
let direnv = (${pkgs.direnv}/bin/direnv export json | from json) 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 $direnv | load-env
" "
})) }))