Skip to content

Use "$@" instead of bare $@ to protect arguments #4395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 7, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Use "$@" instead of bare $@ to protect arguments
Bash expands bare $@, and then do word-splitting and file-globing. It breaks command-line arguments
for arduino if command-line arguments for the wrapper script contains $IFS, '*', '?' and etc. characters.

Use "$@" in this case.
  • Loading branch information
fumiyas committed Jan 6, 2016
commit ad65e5388875462425aab128fe50d4de2812c572
2 changes: 1 addition & 1 deletion build/shared/manpage.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ afterwards:
#!/bin/bash
Xvfb :1 -nolisten tcp -screen :1 1280x800x24 &
xvfb="$!"
DISPLAY=:1 arduino $@
DISPLAY=:1 arduino "$@"
kill -9 $xvfb

Save the script as *arduino-headless* and run it with the options described above.
Expand Down