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:
Kurtis Rader 2017-07-03 16:58:14 -07:00
parent f6d101e7ad
commit f3d025bd75
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View 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