Skip to content

Commit abe8ac2

Browse files
authored
fix: use runuser -u flag to avoid bash --command error (#49)
The previous invocation `runuser builder --command 'bash -l -c /build.sh'` placed the username before the --command option. In su-compatible mode, once the username is parsed, all subsequent arguments are treated as shell arguments rather than runuser options. This caused --command to be passed directly to bash, producing: bash: --command: invalid option This started failing after Arch Linux updated util-linux to a version with stricter argument parsing in su-compatible mode. The fix switches to the -u/--user mode which is the recommended way to run a command as another user, with -- separating runuser options from the command arguments.
1 parent 2ac5a4c commit abe8ac2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ chown -vR builder:builder /home/builder
1717
chmod -vR 600 /home/builder/.ssh/*
1818
echo '::endgroup::'
1919

20-
exec runuser builder --command 'bash -l -c /build.sh'
20+
exec runuser -u builder -- bash -l -c /build.sh

0 commit comments

Comments
 (0)