Skip to content

fix: Correctly quote arguments in container entrypoint script#1232

Merged
dengbo11 merged 1 commit into
OpenAtom-Linyaps:masterfrom
reddevillg:fix_entrypoint
Jun 19, 2025
Merged

fix: Correctly quote arguments in container entrypoint script#1232
dengbo11 merged 1 commit into
OpenAtom-Linyaps:masterfrom
reddevillg:fix_entrypoint

Conversation

@reddevillg

Copy link
Copy Markdown
Collaborator

This change introduces a quoting mechanism (quoteArg) that:

  1. Encloses each argument in single quotes.
  2. Escapes embedded single quotes within an argument (e.g., it's becomes 'it'\''s'). This ensures that arguments are passed to the exec command in the entrypoint script as single, intact units, even if they contain spaces or single quotes.

This change introduces a quoting mechanism (`quoteArg`) that:
1. Encloses each argument in single quotes.
2. Escapes embedded single quotes within an argument (e.g., `it's`
   becomes `'it'\''s'`).
This ensures that arguments are passed to the `exec` command
in the entrypoint script as single, intact units, even if they
contain spaces or single quotes.

Signed-off-by: reddevillg <reddevillg@gmail.com>
@reddevillg reddevillg requested review from ComixHe and dengbo11 June 19, 2025 08:13
@dengbo11 dengbo11 merged commit fb30135 into OpenAtom-Linyaps:master Jun 19, 2025
6 of 14 checks passed
@reddevillg reddevillg deleted the fix_entrypoint branch June 19, 2025 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants