mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 07:23:34 +08:00
always define argv
for scripts
Found when testing what breaks when dereferencing undefined vars is an errors (#4163). Fixes #4181
This commit is contained in:
parent
f6d101e7ad
commit
f3d025bd75
|
@ -434,6 +434,8 @@ int main(int argc, char **argv) {
|
|||
}
|
||||
|
||||
env_set(L"argv", sb.c_str(), 0);
|
||||
} else {
|
||||
env_set(L"argv", NULL, 0);
|
||||
}
|
||||
|
||||
const wcstring rel_filename = str2wcstring(file);
|
||||
|
|
|
@ -24,8 +24,6 @@ end
|
|||
set TERM xterm
|
||||
set -e ITERM_PROFILE
|
||||
|
||||
set -q argv
|
||||
or set argv
|
||||
source test_util.fish (status -f) $argv
|
||||
or exit
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user