mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-02 22:21:15 -03:00
fix: check if system_tests args are empty
When `system_tests` is called without arguments, `[ -n "$@" ]` becomes `[ -n ]`, which is true, resulting in running `export`, which lists all exported variables, unnecessarily cluttering the output. If `system_tests` is called with more than one argument, the check would fail because having more than one argument after `-n` is invalid syntax. Fix this by using `$*`, which concatenates all positional arguments to `system_tests` into a single value. Part of #12636
This commit is contained in:
committed by
Johannes Altmanninger
parent
47a3757f73
commit
dd8e59db03
@@ -124,7 +124,7 @@ fi
|
||||
|
||||
# Using "()" not "{}" because we do want a subshell (for the export)
|
||||
system_tests() (
|
||||
[ -n "$@" ] && export "$@"
|
||||
[ -n "$*" ] && export "$@"
|
||||
export FISH_GETTEXT_EXTRACTION_DIR="$gettext_template_dir"
|
||||
"$workspace_root/tests/test_driver.py" "$build_dir"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user