Skip to content

Extension doesn't work in Windows #18

@amlinux

Description

@amlinux

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. 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions