.cache directory when running multiple instances at the same time

Currently there doesn’t seem to be a way to change the cache directory, which means that only 1 instance of sonar-scanner can run at a time.
When running sonar in 2 separate directories with 2 separate branches:
/some/path/branch-a
/some/path/branch-b

It seems like the cache isn’t used correctly?

Hey there.

You can manually specify sonar.working.directory as mentioned in the docs. Let us know if this helps you run parallel analyses.

Thanks for the link. It says default .sonar - but relative to what? It seems to be relative to the user’s home directory and not the current directory (like everything else)

It’s the user home directory. The idea is that multiple scans (not necessarily running at the same time) would be able to utilize the same cache. Think many projects running their build on the same biuld agent.