Skip to content

Commit

Permalink
Update test.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
eeholmes authored Nov 8, 2024
1 parent 1cda219 commit 3c2a4a9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/test.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
#!/bin/bash
# Required User: NB_USER

echo "user is root"
echo "user is $(whoami)"
echo "NB_PYTHON_PREFIX: $NB_PYTHON_PREFIX"
echo "CONDA_ENV: $CONDA_ENV"
echo "CONDA_DIR: $CONDA_DIR"
echo "PATH: $PATH"

# Check if running as root and switch to NB_USER if needed
if [[ $(id -u) -eq 0 ]]; then
echo "Switching to ${NB_USER} to run install-conda-packages.sh"
exec su "${NB_USER}" -c "/bin/bash $0 $1" # Pass along the filename argument
fi

echo "user is jovyan"
echo "user is $(whoami)"
echo "NB_PYTHON_PREFIX: $NB_PYTHON_PREFIX"
echo "CONDA_ENV: $CONDA_ENV"
echo "CONDA_DIR: $CONDA_DIR"
echo "PATH: $PATH"

0 comments on commit 3c2a4a9

Please sign in to comment.