Test that set -e hasn't leaked into the main shell

pull/1409/head
Simon Li 2025-02-11 18:05:06 +00:00
rodzic a5760555dd
commit 54bf2e7875
2 zmienionych plików z 8 dodań i 1 usunięć

Wyświetl plik

@ -3,3 +3,5 @@ postBuild and start
This test checks that we can use a postBuild and start script
at the same time.
It also checks that exit on error (set -e) has not leaked into the main shell.

Wyświetl plik

@ -1,4 +1,9 @@
#!/bin/bash
#!/bin/bash -il
# Run this as an interactive login shell so that the conda profile is sourced
# Test that `set -e` isn't incorrectly set in a profile
false
set -euo pipefail
grep 'Done!' $HOME/postbuild.txt
# set value of TEST_START_VAR to empty string when it is not defined