diff --git a/nu-hooks/nu-hooks/rusty-paths/rusty-paths.nu b/nu-hooks/nu-hooks/rusty-paths/rusty-paths.nu index a7cbecb..d442c3b 100644 --- a/nu-hooks/nu-hooks/rusty-paths/rusty-paths.nu +++ b/nu-hooks/nu-hooks/rusty-paths/rusty-paths.nu @@ -23,7 +23,7 @@ $env.config = ($env.config | upsert hooks.env_change.PWD { } } | append { - condition: {|before, _| ($before | default '' | path join 'Cargo.lock' | path exists) } + condition: {|before, _| ($before | default '' | path join 'Cargo.lock' | path exists) and ($before | is-not-empty)} code: {|before, _| $env.PATH = ( $env.PATH