You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the client extension typescript code to run command 'bal home' does not work on my windows machine.
extension.ts line 114: let response = spawnSync('bal', ['home']);
returns error ENOENT, apparently because bal is not recognized as a cmd command (even though manual execution of bal inside a cmd does work correctly if Ballerina is installed).
to fix that I changed the code locally to let response = spawnSync('cmd', ['/s', '/c', 'bal', 'home']);
After that I ran npm run build to generate a new .vsix client extension and reinstalled it in VS code. The language server and client worked fine after that.
This fix will only work on windows! To make it work globally an operating system check has to be implemented first which then calls spawnSync with the correct parameters.
The text was updated successfully, but these errors were encountered:
@TiloSchreiber thanks for reporting the issue. I'll send a fix and in the meantime feel free to send a PR for fixing this issue, which will be really awesome :)
Hi,
the client extension typescript code to run command 'bal home' does not work on my windows machine.
extension.ts line 114:
let response = spawnSync('bal', ['home']);
returns error ENOENT, apparently because bal is not recognized as a cmd command (even though manual execution of bal inside a cmd does work correctly if Ballerina is installed).
to fix that I changed the code locally to
let response = spawnSync('cmd', ['/s', '/c', 'bal', 'home']);
After that I ran npm run build to generate a new .vsix client extension and reinstalled it in VS code. The language server and client worked fine after that.
This fix will only work on windows! To make it work globally an operating system check has to be implemented first which then calls spawnSync with the correct parameters.
The text was updated successfully, but these errors were encountered: