Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension doesn't work in Windows #18

Open
amlinux opened this issue Sep 25, 2023 · 0 comments
Open

Extension doesn't work in Windows #18

amlinux opened this issue Sep 25, 2023 · 0 comments

Comments

@amlinux
Copy link

amlinux commented Sep 25, 2023

Extension running on Windows depends on the default terminal setting (and doesn't work in any of them).

If my terminal shell is set to bash, then the following happens:

bash: c:Usersaml.vscodeextensionsstackbuild.bazel-stack-vscode-cc-1.2.0compdbpostprocess.py: command not found

 *  The terminal process "C:\Program Files\Git\bin\bash.exe '--login', '-i', '-c', 'bazelisk build --override_repository=bazel_vscode_compdb=c:\Users\aml\.vscode\extensions\stackbuild.bazel-stack-vscode-cc-1.2.0\compdb\ --aspects=@bazel_vscode_compdb//:aspects.bzl%compilation_database_aspect --color=no --show_result=2147483647 --noshow_progress --noshow_loading_progress --output_groups=compdb_files,header_files --build_event_json_file=C:\Users\aml\AppData\Local\Temp\tmp-14324-bNEOqVPkTvzR //... && c:\Users\aml\.vscode\extensions\stackbuild.bazel-stack-vscode-cc-1.2.0\compdb\postprocess.py -b C:\Users\aml\AppData\Local\Temp\tmp-14324-bNEOqVPkTvzR && rm C:\Users\aml\AppData\Local\Temp\tmp-14324-bNEOqVPkTvzR'" terminated with exit code: 127. 

Backslashes are passed without escaping to bash.

If I set it to Powershell, then the command is not modified and still uses bash-specific &&:

Executing task: bazelisk build --override_repository=bazel_vscode_compdb=c:\Users\aml\.vscode\extensions\stackbuild.bazel-stack-vscode-cc-1.2.0\compdb\ --aspects=@bazel_vscode_compdb//:aspects.bzl%compilation_database_aspect --color=no --show_result=2147483647 --noshow_progress --noshow_loading_progress --output_groups=compdb_files,header_files --build_event_json_file=C:\Users\aml\AppData\Local\Temp\tmp-14324-bbRS9Waq8J10 //... && c:\Users\aml\.vscode\extensions\stackbuild.bazel-stack-vscode-cc-1.2.0\compdb\postprocess.py -b C:\Users\aml\AppData\Local\Temp\tmp-14324-bbRS9Waq8J10 && rm C:\Users\aml\AppData\Local\Temp\tmp-14324-bbRS9Waq8J10 

At line:1 char:417
+ ... \Users\aml\AppData\Local\Temp\tmp-14324-bbRS9Waq8J10 //... && c:\User ...      
+                                                                ~~
The token '&&' is not a valid statement separator in this version.
At line:1 char:571
+ ...  -b C:\Users\aml\AppData\Local\Temp\tmp-14324-bbRS9Waq8J10 && rm C:\U ...      
+                                                                ~~
The token '&&' is not a valid statement separator in this version.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : InvalidEndOfLine
 

 *  The terminal process "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command bazelisk build --override_repository=bazel_vscode_compdb=c:\Users\aml\.vscode\extensions\stackbuild.bazel-stack-vscode-cc-1.2.0\compdb\ --aspects=@bazel_vscode_compdb//:aspects.bzl%compilation_database_aspect --color=no --show_result=2147483647 --noshow_progress --noshow_loading_progress --output_groups=compdb_files,header_files --build_event_json_file=C:\Users\aml\AppData\Local\Temp\tmp-14324-bbRS9Waq8J10 //... && c:\Users\aml\.vscode\extensions\stackbuild.bazel-stack-vscode-cc-1.2.0\compdb\postprocess.py -b C:\Users\aml\AppData\Local\Temp\tmp-14324-bbRS9Waq8J10 && rm C:\Users\aml\AppData\Local\Temp\tmp-14324-bbRS9Waq8J10" terminated with exit code: 1. 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant