Skip to content

Commit

Permalink
add SONARQUBE_SCANNER_HOME to override homedir
Browse files Browse the repository at this point in the history
  • Loading branch information
qqshfox authored Jan 23, 2019
1 parent 0c5f9d7 commit 4fca30e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dist/sonarqube-scanner-executable.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ function prepareExecEnvironment(params, process) {
function getSonarQubeScannerExecutable(passExecutableCallback) {
const platformBinariesVersion = '3.2.0.1227'
var targetOS = findTargetOS()
var installFolder = path.join(os.homedir(), '.sonar', 'native-sonar-scanner')
var homedir = process.env.SONARQUBE_SCANNER_HOME || os.homedir()
var installFolder = path.join(homedir, '.sonar', 'native-sonar-scanner')
var binaryExtension = ''
if (isWindows()) {
binaryExtension = '.bat'
Expand Down

0 comments on commit 4fca30e

Please sign in to comment.