diff --git a/tools/cpp/osx_cc_wrapper.sh b/tools/cpp/osx_cc_wrapper.sh index 8c9c111a750587..bd8f12f26a9747 100755 --- a/tools/cpp/osx_cc_wrapper.sh +++ b/tools/cpp/osx_cc_wrapper.sh @@ -53,7 +53,7 @@ function parse_option() { # let parse the option list for i in "$@"; do - if [[ "$i" = @* ]]; then + if [[ "$i" = @* && -r "${i:1}" ]]; then while IFS= read -r opt do parse_option "$opt" diff --git a/tools/cpp/osx_cc_wrapper.sh.tpl b/tools/cpp/osx_cc_wrapper.sh.tpl index 28bd47ba1a4a97..25ed2ece8e8b4e 100644 --- a/tools/cpp/osx_cc_wrapper.sh.tpl +++ b/tools/cpp/osx_cc_wrapper.sh.tpl @@ -52,7 +52,7 @@ function parse_option() { # let parse the option list for i in "$@"; do - if [[ "$i" = @* ]]; then + if [[ "$i" = @* && -r "${i:1}" ]]; then while IFS= read -r opt do parse_option "$opt"