diff options
| author | Richard Hansen <rhansen@rhansen.org> | 2016-01-23 02:45:48 -0500 |
|---|---|---|
| committer | Richard Hansen <rhansen@rhansen.org> | 2016-01-31 16:12:58 -0500 |
| commit | 6b298c692a6513dddc64b616f0398cef596e028f (patch) | |
| tree | ee8a9c2ae9b11e963c945998f480adf013c9f0f6 | |
| parent | 17914a3572954f605699ec5c74e0c31d96a5dab8 (diff) | |
| download | gitlab-6b298c692a6513dddc64b616f0398cef596e028f.tar.gz | |
only run deactivate if it exists
The deactivate command only exists if activate is run, but cleanup()
might be called before activate is run if there is an error.
| -rwxr-xr-x | tools/build_test_env.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/build_test_env.sh b/tools/build_test_env.sh index 5acbf7b..0c1be88 100755 --- a/tools/build_test_env.sh +++ b/tools/build_test_env.sh @@ -54,7 +54,7 @@ cleanup() { rm -f /tmp/python-gitlab.cfg docker kill gitlab-test >/dev/null 2>&1 docker rm gitlab-test >/dev/null 2>&1 - deactivate || true + command -v deactivate >/dev/null 2>&1 && deactivate || true rm -rf $VENV } [ -z "${BUILD_TEST_ENV_AUTO_CLEANUP+set}" ] || { |
