Skip to content

Commit 4f54b1a

Browse files
authored
Support configs with no hooks in rusty-paths.nu (#1096)
Use upsert instead of update to support configurations without PWD-env hooks (the default)
1 parent c62a46d commit 4f54b1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nu-hooks/nu-hooks/rusty-paths/rusty-paths.nu

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# 2. Add `source rusty-paths.nu` to `$nu.config-path`
1111

1212

13-
$env.config = ($env.config | update hooks.env_change.PWD {
13+
$env.config = ($env.config | upsert hooks.env_change.PWD {
1414
append {
1515
condition: {|_, after| ($after | path join 'Cargo.lock' | path exists) }
1616
code: {

0 commit comments

Comments
 (0)