Skip to content
This repository has been archived by the owner on Mar 9, 2023. It is now read-only.

Commit

Permalink
Merge pull request #157 from romanbalayan/feat/docs-customScanner-sam…
Browse files Browse the repository at this point in the history
…ple-usage

Modify README for customScanner sample usage.
  • Loading branch information
gabssnake authored Oct 25, 2022
2 parents a0bf482 + b5d76a7 commit 3e9c18d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 (<project_dir>/node_modules/sonarqube-scanner/src/sonar-scanner-executable.js:153:11)
at scanUsingCustomScanner (<project_dir>/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;
Expand Down

0 comments on commit 3e9c18d

Please sign in to comment.