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

Powershell wrapper does not run #643

Open
avdv opened this issue Nov 29, 2024 · 0 comments
Open

Powershell wrapper does not run #643

avdv opened this issue Nov 29, 2024 · 0 comments

Comments

@avdv
Copy link

avdv commented Nov 29, 2024

I was trying to use a bazel wrapper on Windows, so I created tools/bazel.ps1 file in my project.

Trying to use that leads to this error:

2024/11/28 16:38:21 could not run Bazel: could not start Bazel: fork/exec D:\a\rules_sh\rules_sh\tests\tools\bazel.ps1: %1 is not a valid Win32 application.

It seems PowerShell scripts cannot be executed like native binaries; they need to be run through pwsh (PowerShell Core) or powershell (Windows PowerShell).

Using a bat wrapper for the wrapper works:

@echo off
pwsh -File "%~dp0tools\bazel_wrapper.ps1" %*
avdv added a commit to tweag/rules_sh that referenced this issue Nov 29, 2024
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