From 8007503553cb1b7fd60b8c947ef28fbe2dea65aa Mon Sep 17 00:00:00 2001 From: JosephEarl Date: Tue, 16 Sep 2014 17:50:50 +0100 Subject: [PATCH] Prevent bash file expansions breaking the script Fixes an issue where the oclint-json-compilation-database call fails if there is an .xcworkspace and a .xcproj due to bash filename expansions --- src/main/shell/run-sonar.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/shell/run-sonar.sh b/src/main/shell/run-sonar.sh index 878cff86..4c4f8b87 100755 --- a/src/main/shell/run-sonar.sh +++ b/src/main/shell/run-sonar.sh @@ -277,7 +277,7 @@ if [ "$oclint" = "on" ]; then includedCommandLineFlags="" echo "$srcDirs" | sed -n 1'p' | tr ',' '\n' > tmpFileRunSonarSh while read word; do - includedCommandLineFlags+=" --include .*/${currentDirectory}/${word}.*" + includedCommandLineFlags+=" --include '.*/${currentDirectory}/${word}.*'" done < tmpFileRunSonarSh rm -rf tmpFileRunSonarSh if [ "$vflag" = "on" ]; then