From ad65e5388875462425aab128fe50d4de2812c572 Mon Sep 17 00:00:00 2001 From: SATOH Fumiyasu Date: Wed, 6 Jan 2016 22:09:04 +0900 Subject: [PATCH] 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. --- build/shared/manpage.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/shared/manpage.adoc b/build/shared/manpage.adoc index 557615df1..7dc647fc4 100644 --- a/build/shared/manpage.adoc +++ b/build/shared/manpage.adoc @@ -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.