diff options
| author | Eric Biggers <ebiggers@google.com> | 2020-11-07 20:30:51 -0800 |
|---|---|---|
| committer | Eric Biggers <ebiggers3@gmail.com> | 2020-11-07 20:46:57 -0800 |
| commit | 4d37d7eaedae964cf72e82ec959a2482916faa1b (patch) | |
| tree | c8c7992b304e9c86aff57ec351ae558d852f7703 /cli-tests/common.sh | |
| parent | b68d603854bb38f59e77963d61ca25d92b945589 (diff) | |
cli-tests/common.sh: fix _user_do()
Apparently, on some distros 'su' doesn't preserve $PATH. So, manually
export it in the command. Also, ensure that the shell stays as bash.
This is needed for some of the CLI tests to pass in Travis CI.
Diffstat (limited to 'cli-tests/common.sh')
| -rw-r--r-- | cli-tests/common.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cli-tests/common.sh b/cli-tests/common.sh index 79b42ae..527eaa4 100644 --- a/cli-tests/common.sh +++ b/cli-tests/common.sh @@ -117,7 +117,7 @@ _user_do() { [ $# -ne 1 ] && _fail "wrong argument count to ${FUNCNAME[0]}" - su "$TEST_USER" --command="$1" + su "$TEST_USER" --shell=/bin/bash --command="export PATH='$PATH'; $1" } # Runs the given shell command as the test user and expects it to fail. |