nvuillam / vscode-groovy-lint

VSCode extension to lint , correct and format groovy and Jenkinsfile
https://nvuillam.github.io/vscode-groovy-lint/
MIT License
68 stars 18 forks source link

Issue running on Windows when space in path #232

Open adehad opened 1 month ago

adehad commented 1 month ago

Hi there,

groovy-lint as the VSCode extension used to work fine on my machine can't narrows exactly when it broke but I last used it successfully in March 2024.

However, a recent change has me seeing the following error appear in a console window:

"C:\Users\FirstName LastName\.java-caller\jre\jdk-17.0.10+7-jre\bin\java.exe" -Xms256m -Xmx2048m -jar c:\Users\FirstName LastName\.vscode\extensions\nicolasvuillamy.vscode-groovy-lint-3.3.1\server\node_moduIes\npm-groovy-lint\lib/java/CodeNarcServer.jar --server

The full log I see on the VSCode extension I see is:

Start analyzing file:///d%3A/dev/Internal/cookiecutter-python/Jenkinsfile.docker
GroovyLint: Unable to start CodeNarc Server. Use --noserver if you do not even want to try
GroovyLint: Error running CodeNarc: 
The command line is too long.

===========================================================================
===========================================================================
npm-groovy-lint error: Fatal error while calling CodeNarc
Reason: unknown
The command line is too long.

undefined
If you still have an error, post an issue to get help: https://github.com/nvuillam/vscode-groovy-lint/issues
===========================================================================
===========================================================================
Start analyzing file:///d%3A/dev/Internal/cookiecutter-python/Jenkinsfile.docker
GroovyLint: Unable to start CodeNarc Server. Use --noserver if you do not even want to try
GroovyLint: Error running CodeNarc: 
The command line is too long.

===========================================================================
===========================================================================
npm-groovy-lint error: Fatal error while calling CodeNarc
Reason: unknown
The command line is too long.

undefined
If you still have an error, post an issue to get help: https://github.com/nvuillam/vscode-groovy-lint/issues
===========================================================================
===========================================================================
Start analyzing file:///d%3A/dev/Internal/cookiecutter-python/Jenkinsfile.docker
GroovyLint: Unable to start CodeNarc Server. Use --noserver if you do not even want to try
GroovyLint: Error running CodeNarc: 
The command line is too long.

===========================================================================
===========================================================================
npm-groovy-lint error: Fatal error while calling CodeNarc
Reason: unknown
The command line is too long.

undefined
If you still have an error, post an issue to get help: https://github.com/nvuillam/vscode-groovy-lint/issues
===========================================================================
===========================================================================
Start formatting file:///d%3A/dev/Internal/cookiecutter-python/Jenkinsfile.docker
GroovyLint: Unable to start CodeNarc Server. Use --noserver if you do not even want to try
GroovyLint: Error running CodeNarc: 
Error: Unable to access jarfile c:\Users\FirstName

===========================================================================
===========================================================================
npm-groovy-lint error: Fatal error while calling CodeNarc
Reason: unknown
Error: Unable to access jarfile c:\Users\FirstName

undefined
If you still have an error, post an issue to get help: https://github.com/nvuillam/vscode-groovy-lint/issues
===========================================================================

My guess would be that the "jar" file is not getting escaped in quotes in the command itself. Additionally it appears like there is mixed path separators (not sure if that would be a problem, but might not hurt to fix too)

Apologies for raising this here instead of npm package which it looks like is the source of the issue.

github-actions[bot] commented 1 week ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 🤖 label or comment on the issue.