Commit 75742278 authored by fouding's avatar fouding Committed by GitHub

fix condition-testing syntax bugs

parent 5ded1de0
......@@ -30,7 +30,7 @@ if [ $(id -u) == 0 ] ; then
fi
# Enable sudo if requested
if [ "$GRANT_SUDO" == "1" || "$GRANT_SUDO" == 'yes' ]; then
if [[ "$GRANT_SUDO" == "1" || "$GRANT_SUDO" == 'yes' ]]; then
echo "Granting $NB_USER sudo access"
echo "$NB_USER ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/notebook
fi
......@@ -45,7 +45,7 @@ else
if [[ ! -z "$NB_GID" && "$NB_GID" != "$(id -g)" ]]; then
echo 'Container must be run as root to set $NB_GID'
fi
if [ "$GRANT_SUDO" == "1" || "$GRANT_SUDO" == 'yes' ]; then
if [[ "$GRANT_SUDO" == "1" || "$GRANT_SUDO" == 'yes' ]]; then
echo 'Container must be run as root to grant sudo permissions'
fi
# Exec the command
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment