diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-10-02 08:02:44 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-10-02 12:04:05 +0300 |
commit | e2ecc7813c6deb91efd9a1b66a2f9e9ff9721a32 (patch) | |
tree | d09ac7aa646aa57d70541571d43705fe5acae0c8 /templates | |
parent | 3c9179418efdd8fdd0a7628ee13d4bac63e70eea (diff) | |
download | subplot-e2ecc7813c6deb91efd9a1b66a2f9e9ff9721a32.tar.gz |
fix(templates/bash): when unsetting env, handle vars with newlines
Previously we couldn't handle environments with the TERMCAP variable.
Now we can.
TERMCAP is set, for example, when logging in via ssh to a beefy server
to run tests or benchmarks.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/bash/template.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/templates/bash/template.sh b/templates/bash/template.sh index 1da4f5b..04af08f 100644 --- a/templates/bash/template.sh +++ b/templates/bash/template.sh @@ -236,7 +236,8 @@ scenario_{{ loop.index }}() { ############################################################################# # Make the environment minimal. -unset $(env | sed 's/=.*//') +# unset all environment variables +unset $(python3 -c 'import os; print("".join(x + "\n" for x in os.environ.keys()))') export PATH=/bin:/usr/bin export SHELL=/bin/sh export HOME=/ # Will be set to datadir for each scenario. |