Unify access to env variables (#2086)

This commit is contained in:
Ayaz Salikhov
2024-01-21 17:32:14 +04:00
committed by GitHub
parent a4ede5de2f
commit b71f4cb525
5 changed files with 5 additions and 5 deletions

View File

@@ -30,7 +30,7 @@ jobs:
- name: Calculate recipes matrix 🛠 - name: Calculate recipes matrix 🛠
id: set-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: test-recipes:
runs-on: ${{ matrix.runs-on }} runs-on: ${{ matrix.runs-on }}

View File

@@ -3,7 +3,7 @@ set -ex
GITHUB_RUNNER_USER="runner-user" GITHUB_RUNNER_USER="runner-user"
if [ "$EUID" -ne 0 ]; then if [ "${EUID}" -ne 0 ]; then
echo "Please run as root" echo "Please run as root"
exit 1 exit 1
fi fi

View File

@@ -33,7 +33,7 @@ RUN wget --progress=dot:giga "${INSTANTCLIENT_URL}/oracle-instantclient-basiclit
# And configure variables # And configure variables
RUN echo "ORACLE_HOME=/usr/lib/oracle/${INSTANTCLIENT_MAJOR_VERSION}/client64" >> "${HOME}/.bashrc" && \ 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 "LD_LIBRARY_PATH=${ORACLE_HOME}/lib:${LD_LIBRARY_PATH}" >> "${HOME}/.bashrc" && \
echo "export ORACLE_HOME" >> "${HOME}/.bashrc" && \ echo "export ORACLE_HOME" >> "${HOME}/.bashrc" && \
echo "export PATH" >> "${HOME}/.bashrc" && \ echo "export PATH" >> "${HOME}/.bashrc" && \

View File

@@ -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 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 # 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!" _log "Granting ${NB_USER} passwordless sudo rights!"
echo "${NB_USER} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/added-by-start-script echo "${NB_USER} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/added-by-start-script
fi fi

View File

@@ -262,7 +262,7 @@ def test_jupyter_env_vars_to_unset(
"start.sh", "start.sh",
"bash", "bash",
"-c", "-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 **root_args, # type: ignore
) )