Skip to content
This repository has been archived by the owner on Apr 27, 2021. It is now read-only.

Too long command for rules execution when running on Windows #193

Closed
jvanoostveen opened this issue Aug 28, 2017 · 7 comments
Closed

Too long command for rules execution when running on Windows #193

jvanoostveen opened this issue Aug 28, 2017 · 7 comments
Assignees
Milestone

Comments

@jvanoostveen
Copy link

When I run the Sonar Scanner on our codebase, it crashes with the following error (partial):

Caused by: java.io.IOException: Cannot run program "node": CreateProcess error=206, The filename or extension is too long
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
        at org.sonar.plugin.typescript.ExternalTypescriptSensor.runRulesProcess(ExternalTypescriptSensor.java:218)
        ... 34 more
Caused by: java.io.IOException: CreateProcess error=206, The filename or extension is too long
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
        at java.lang.ProcessImpl.start(ProcessImpl.java:137)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)

When I look at the command executed, I notice it contains every file it wants to pass to tslint, which are quite a few...
The length of the command (node) and the tslint call with the arguments and files is 33018 characters long! I recon this doesn't work on Windows...

I have setup the sonar-project.properties in such way, it contains several modules, each with their own sonar.sources.
When I limit the set of files for that specific module, it does succeed.
It might help to use this setting as a glob for tslint when instantiating tslint.

Environment:
Windows 10 (build 1703)
PowerShell

@stas-vilchik stas-vilchik added this to the 1.1 milestone Aug 28, 2017
@olivierlemasle
Copy link

Same issue (with Windows 2012R2)

@jvanoostveen
Copy link
Author

Any news on this issue? It is really blocking any practical use of this plugin in SonarQube...

@inverno
Copy link
Contributor

inverno commented Sep 20, 2017

@jvanoostveen the news is that it's as a bug and it was tentatively added it to the 1.1 version. Which means it's going to be fixed soon.
About your proposed solution: I'm not sure we are going to use glob for tslint, we have always considered the tslint command line as only a temporary runner for SonarTS and we will likely implement a new one as we did for the metrics.

@jvanoostveen
Copy link
Author

I'm looking forward to a fix :), I've been trying to find where it was called myself to make a quick fix/hack, but I haven't found it...

@vilchik-elena vilchik-elena changed the title CreateProcess The filename or extension is too long Too long command for rules execution when running on Windows Oct 2, 2017
@inverno inverno added in progress and removed ready labels Oct 4, 2017
@rlouissidney
Copy link

+1 I have the same issue on a windows 10 Pro (Build 1715) Sonar 5.6.3

@vilchik-elena
Copy link
Contributor

Fixed by #209

@ghost ghost removed the in progress label Oct 13, 2017
@inverno inverno self-assigned this Oct 16, 2017
@inverno
Copy link
Contributor

inverno commented Oct 20, 2017

@jvanoostveen try the RC we just published, this is included

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants