SonarJS icon indicating copy to clipboard operation
SonarJS copied to clipboard

If the extraction of Node.js runtime fails in the default folder, suggest using the `SONAR_USER_HOME` env variable to set another one

Open ilia-kebets-sonarsource opened this issue 1 year ago • 1 comments

For some of our customers' environments, writing files in the default ~/.sonar/ folder is forbidden. Our error message is the default IOException:

java.io.IOException: failed to create directory C:\Program Files\Eclipse\2023-06\.node\node-v18.16.0-win-x64

like shown in this community ticket.

We should filter this error and suggest using the SONAR_USER_HOME environment variable when such permissions are not given.

ilia-kebets-sonarsource avatar Nov 20 '23 07:11 ilia-kebets-sonarsource

A related issue is: what happens if we still somehow corrupt the node.js runtime? It will not get overwritten as long as its version is the latest since we perform that check reading the version.txt file. => We should only use version.txt to read the version of the compressed runtime. The version of the extracted runtime should be evaluated using PATH_TO_RUNTIME --version.

ilia-kebets-sonarsource avatar Nov 21 '23 14:11 ilia-kebets-sonarsource

Migrated to Jira. New ticket number: JS-70

Wohops avatar Apr 24 '24 15:04 Wohops