Skip to content

Commit b6e9dd3

Browse files
authored
Update hooks.md (nushell#1749)
``` Error: nu::shell::type_mismatch × Type mismatch during operation. ╭─[/Users/foo/Library/Application Support/nushell/config.nu:27:33] 26 │ ('/Users/foo/dir' not-in $after 27 │ and '/Users/foo/dir' in $before · ─────────────────────┬──────────────────── ─┬ ───┬─── · │ │ ╰── nothing · │ ╰── type mismatch for operator · ╰── string 28 │ and 'activate' in (overlay list)) ╰──── ~ ❯ 𝒾: process finished with exit code = -1 ```
1 parent fde4cba commit b6e9dd3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

book/hooks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ $env.config = ($env.config | upsert hooks.env_change.PWD {
226226
{
227227
condition: {|before, after|
228228
('/path/to/target/dir' not-in $after
229-
and '/path/to/target/dir' in $before
229+
and '/path/to/target/dir' in ($before | default "")
230230
and 'test-env' in (overlay list))
231231
}
232232
code: "overlay hide test-env --keep-env [ PWD ]"

0 commit comments

Comments
 (0)