-# On Mac OSX, you don't want to run SonarQube but to exec the build command directly.
-if [ ${TRAVIS_OS_NAME} != 'linux' ]
+# On Mac OSX or with pull requests, you don't want to run SonarQube but to exec the build command directly.
+if [ ${TRAVIS_OS_NAME} != 'linux' ] || [ ${TRAVIS_PULL_REQUEST} != 'false' ]
./build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-outputs "$@"
# and finally execute the actual SonarQube analysis (the SONAR_TOKEN is set from the travis web interface, to not expose it)
./build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-outputs "$@"
# and finally execute the actual SonarQube analysis (the SONAR_TOKEN is set from the travis web interface, to not expose it)