File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed
repo2docker/buildpacks/conda
tests/venv/start/postBuild Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 11# enable conda and activate the notebook environment
2- set -ex
2+ set -e
33eval $( micromamba shell hook -s posix -r ${CONDA_DIR} )
44for name in conda mamba; do
55 CONDA_PROFILE=" ${CONDA_DIR} /etc/profile.d/${name} .sh"
@@ -21,3 +21,5 @@ if [[ "${KERNEL_PYTHON_PREFIX}" != "${NB_PYTHON_PREFIX}" ]]; then
2121else
2222 mamba activate ${NB_PYTHON_PREFIX}
2323fi
24+
25+ set +e
Original file line number Diff line number Diff line change @@ -3,3 +3,5 @@ postBuild and start
33
44This test checks that we can use a postBuild and start script
55at the same time.
6+
7+ It also checks that exit on error (set -e) has not leaked into the main shell.
Original file line number Diff line number Diff line change 1- #! /bin/bash
1+ #! /bin/bash -il
2+ # Run this as an interactive login shell so that the conda profile is sourced
3+
4+ # Test that `set -e` isn't incorrectly set in a profile
5+ false
6+
27set -euo pipefail
38grep ' Done!' $HOME /postbuild.txt
49# set value of TEST_START_VAR to empty string when it is not defined
You can’t perform that action at this time.
0 commit comments