Skip to content

Commit 1199382

Browse files
convert the direnv export PATH to a list before loading it into env (#2223)
1 parent 43ca942 commit 1199382

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

cookbook/direnv.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ $env.config.hooks.env_change.PWD ++= [{||
3838
return
3939
}
4040
41-
direnv export json | from json | default {} | load-env
42-
# If direnv changes the PATH, it will become a string and we need to re-convert it to a list
43-
$env.PATH = do (env-conversions).path.from_string $env.PATH
41+
direnv export json | from json | default {} | update cells --columns [ PATH ] {
42+
# If direnv changes the PATH, it will become a string and we need to re-convert it to a list
43+
do (env-conversions).path.from_string $in
44+
} | load-env
4445
}]
4546
```
4647

0 commit comments

Comments
 (0)