Skip to content

Commit

Permalink
Test that set -e hasn't leaked into the main shell
Browse files Browse the repository at this point in the history
  • Loading branch information
manics committed Feb 11, 2025
1 parent a576055 commit 54bf2e7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tests/venv/start/postBuild/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
7 changes: 6 additions & 1 deletion tests/venv/start/postBuild/verify
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 54bf2e7

Please sign in to comment.