We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e676e83 commit 1f04771Copy full SHA for 1f04771
1 file changed
try
@@ -293,7 +293,13 @@ cd "$START_DIR" &&
293
OLDPWD=$OLDPWD . "$script_to_execute"
294
EOF
295
296
- echo "$@" >"$script_to_execute"
+ {
297
+ printf '#!/bin/sh\nexec'
298
+ for arg in "$@"; do
299
+ printf ' %s' "'$(printf %s "$arg" | sed "s/'/'\"'\"'/g")'"
300
+ done
301
+ printf '\n'
302
+ } >"$script_to_execute"
303
304
# `$script_to_execute` need not be +x to be sourced
305
chmod +x "$mount_and_execute" "$chroot_executable"
0 commit comments