Skip to content

Commit

Permalink
wardenenv#155: fix var names
Browse files Browse the repository at this point in the history
  • Loading branch information
Toon Van Dooren committed Sep 23, 2023
1 parent bf44244 commit 27317e2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions commands/env.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
WARDEN_ENV_PATH="$(locateEnvPath)" || exit $?
loadEnvConfig "${WARDEN_ENV_PATH}" || exit $?
assertDockerRunning
HOSTUID=$(id -u)
HOSTGID=$(id -g)
HOST_UID=$(id -u)
HOST_GID=$(id -g)

if (( ${#WARDEN_PARAMS[@]} == 0 )) || [[ "${WARDEN_PARAMS[0]}" == "help" ]]; then
# shellcheck disable=SC2153
Expand Down Expand Up @@ -231,14 +231,14 @@ then
fi

if [[ "${WARDEN_PARAMS[0]}" == "up" ]] || [[ "${WARDEN_PARAMS[0]}" == "start" ]]; then
if [[ $($WARDEN_BIN env ps -q php-fpm) ]] && [ $($WARDEN_BIN env exec php-fpm "id" "-u" "www-data") != ${HOSTUID} ]; then
$WARDEN_BIN env exec -u 0 php-fpm "usermod" "-u" "${HOSTUID}" "www-data"
$WARDEN_BIN env exec -u 0 php-fpm "usermod" "-g" "${HOSTGID}" "www-data"
if [[ $($WARDEN_BIN env ps -q php-fpm) ]] && [ $($WARDEN_BIN env exec php-fpm "id" "-u" "www-data") != ${HOST_UID} ]; then
$WARDEN_BIN env exec -u 0 php-fpm "usermod" "-u" "${HOST_UID}" "www-data"
$WARDEN_BIN env exec -u 0 php-fpm "usermod" "-g" "${HOST_GID}" "www-data"
$WARDEN_BIN env restart php-fpm
fi
if [[ $($WARDEN_BIN env ps -q php-debug) ]] && [ $($WARDEN_BIN env exec php-debug "id" "-u" "www-data") != ${HOSTUID} ]; then
$WARDEN_BIN env exec -u 0 php-debug "usermod" "-u" "${HOSTUID}" "www-data"
$WARDEN_BIN env exec -u 0 php-debug "usermod" "-g" "${HOSTGID}" "www-data"
if [[ $($WARDEN_BIN env ps -q php-debug) ]] && [ $($WARDEN_BIN env exec php-debug "id" "-u" "www-data") != ${HOST_UID} ]; then
$WARDEN_BIN env exec -u 0 php-debug "usermod" "-u" "${HOST_UID}" "www-data"
$WARDEN_BIN env exec -u 0 php-debug "usermod" "-g" "${HOST_GID}" "www-data"
$WARDEN_BIN env restart php-debug
fi
fi
Expand Down

0 comments on commit 27317e2

Please sign in to comment.