9

i followed the directions as per the SonarQube documentation. I installed the sonarqube and sonar-scanner from the instructions into my applications folder. But having trouble getting my terminal to recognize sonar-scanner. I checked my path variable by trying the following:

echo $PATH

and got...

/Users/Neptune/Applications/SonarQube/bin:/Users/Neptune/Applications/SonarScanner/bin:/Users/Neptune/anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/domino:/Library/TeX/texbin:/Library/Apple/usr/bin

This is what i have for my path

export PATH="/Users/Neptune/Applications/SonarScanner/bin:$PATH"
export PATH="/Users/Neptune/Applications/SonarQube/bin:$PATH"

I then changed it to:

export PATH="/Users/Neptune/Applications/SonarScanner/bin/sonar-scanner:$PATH"

AFter each method, i restarted my shell and still no luck. I then went to my project root directory where i have my python code installed and added a project.properties file but i don't see how that helps with the terminal recognizing sonar-scanner -h as a command. Can someone please help. Thanks

SonarQube fires for me and im able to start a localhost:9000 server. Its getting mac to recognize sonar-scanner is whats causing me problems.

edit: i managed to get sonar-scanner working. But it's such a painful process. I have to always type:

sh /Applications/SonarScanner/bin/sonar-scanner
turtle_in_mind
  • 986
  • 1
  • 18
  • 36

1 Answers1

3

I was facing the same issue:

zsh: command not found: sonar-scanner

I have installed sonar globally

npm install sonarqube-scanner -g  

And it worked for me.

Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77
Ananya
  • 31
  • 2