Skip to content

Commit

Permalink
Unify access to env variables (#2086)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathbunnyru authored Jan 21, 2024
1 parent a4ede5d commit b71f4cb
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/contributed-recipes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

- name: Calculate recipes matrix 🛠
id: set-matrix
run: docs/using/recipe_code/generate_matrix.py >> $GITHUB_OUTPUT
run: docs/using/recipe_code/generate_matrix.py >> "${GITHUB_OUTPUT}"

test-recipes:
runs-on: ${{ matrix.runs-on }}
Expand Down
2 changes: 1 addition & 1 deletion aarch64-runner/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -ex

GITHUB_RUNNER_USER="runner-user"

if [ "$EUID" -ne 0 ]; then
if [ "${EUID}" -ne 0 ]; then
echo "Please run as root"
exit 1
fi
Expand Down
2 changes: 1 addition & 1 deletion docs/using/recipe_code/oracledb.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ RUN wget --progress=dot:giga "${INSTANTCLIENT_URL}/oracle-instantclient-basiclit

# And configure variables
RUN echo "ORACLE_HOME=/usr/lib/oracle/${INSTANTCLIENT_MAJOR_VERSION}/client64" >> "${HOME}/.bashrc" && \
echo "PATH=${ORACLE_HOME}/bin:$PATH" >> "${HOME}/.bashrc" && \
echo "PATH=${ORACLE_HOME}/bin:${PATH}" >> "${HOME}/.bashrc" && \
echo "LD_LIBRARY_PATH=${ORACLE_HOME}/lib:${LD_LIBRARY_PATH}" >> "${HOME}/.bashrc" && \
echo "export ORACLE_HOME" >> "${HOME}/.bashrc" && \
echo "export PATH" >> "${HOME}/.bashrc" && \
Expand Down
2 changes: 1 addition & 1 deletion images/docker-stacks-foundation/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ if [ "$(id -u)" == 0 ]; then
sed -r "s#Defaults\s+secure_path\s*=\s*\"?([^\"]+)\"?#Defaults secure_path=\"${CONDA_DIR}/bin:\1\"#" /etc/sudoers | grep secure_path > /etc/sudoers.d/path

# Optionally grant passwordless sudo rights for the desired user
if [[ "$GRANT_SUDO" == "1" || "$GRANT_SUDO" == "yes" ]]; then
if [[ "${GRANT_SUDO}" == "1" || "${GRANT_SUDO}" == "yes" ]]; then
_log "Granting ${NB_USER} passwordless sudo rights!"
echo "${NB_USER} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/added-by-start-script
fi
Expand Down
2 changes: 1 addition & 1 deletion tests/docker-stacks-foundation/test_user_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def test_jupyter_env_vars_to_unset(
"start.sh",
"bash",
"-c",
"echo I like $FRUIT and ${SECRET_FRUIT:-stuff}, and love ${SECRET_ANIMAL:-to keep secrets}!",
"echo I like ${FRUIT} and ${SECRET_FRUIT:-stuff}, and love ${SECRET_ANIMAL:-to keep secrets}!",
],
**root_args, # type: ignore
)
Expand Down

0 comments on commit b71f4cb

Please sign in to comment.