Skip to content

Commit 24a3332

Browse files
committed
fix: user args not set correctly when running exec or run
1 parent 7ed643c commit 24a3332

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bin/nge

+4-4
Original file line numberDiff line numberDiff line change
@@ -207,17 +207,17 @@ fi
207207
function app_crun() {
208208
if [ $ONCE == "no" ]; then
209209
if [ -z "$NGE_USER" ]; then
210-
compose exec -it --user=$NGE_USER $APP_SERVICE $@
211-
else
212210
echo "${YELLOW}NGE_USER not set. Running with default user.${NC}" >&2
213211
compose exec -it $APP_SERVICE $@
212+
else
213+
compose exec -it --user=$NGE_USER $APP_SERVICE $@
214214
fi
215215
else
216216
if [ -z "$NGE_USER" ]; then
217-
compose run --rm --user=$NGE_USER $APP_SERVICE $@
218-
else
219217
echo "${YELLOW}NGE_USER not set. Running with default user.${NC}" >&2
220218
compose run --rm $APP_SERVICE $@
219+
else
220+
compose run --rm --user=$NGE_USER $APP_SERVICE $@
221221
fi
222222
fi
223223
}

0 commit comments

Comments
 (0)