diff --git a/README.md b/README.md index cda13adc..a99d25c6 100644 --- a/README.md +++ b/README.md @@ -87,8 +87,18 @@ sonar-scanner #### *I constantly get "Impossible to download and extract binary [...] In such situation, the best solution is to install the standard SonarScanner", what can I do?* You can install manually the [standard SonarScanner](https://redirect.sonarsource.com/doc/install-configure-scanner.html), -which requires to have a Java Runtime Environment available too (Java 8+). Once this is done, you can replace the 2nd line -of the example by: +which requires to have a Java Runtime Environment available too (Java 8+). + +It is important to make sure that the SonarScanner `$install_directory/bin` location is added to the system `$PATH` environment variable. This will ensure that `sonar-scanner` command will be resolved by the customScanner, and prevent the error: + +``` javascript +Error: Local install of SonarScanner not found. + at getLocalSonarScannerExecutable (/node_modules/sonarqube-scanner/src/sonar-scanner-executable.js:153:11) + at scanUsingCustomScanner (/node_modules/sonarqube-scanner/src/index.js:52:3) +... +``` + +Once local installation is done, you can replace the 2nd line of the example: ```javascript var scanner = require('sonarqube-scanner').customScanner;