-
-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
The following failure feels related to quoting the semicolons within the argument to bash -c being passed the interactive shell
sudo -u root bash -c 'MACHINEFILE=0.9.0 BUILDKIT_SYNTAX= BUILD_DATE="2025-10-15 05:56:50" USER_PASSWD=password BASE_IMAGE=ghcr.io/gbraad-dotfiles/fedora BASE_VERSION=41 if [ -n "password" ] ; then echo "gbraad:password" | sudo chpasswd && echo "Password set to: password"; fi'
bash: -c: line 1: syntax error near unexpected token `then'However, this is related to how bash -c processes its own argument string when it contains an assignment followed immediately by if on the same "logical" line.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels