-
Notifications
You must be signed in to change notification settings - Fork 560
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
Unable to locate executable file: powershell #552
Comments
Hi @dwisiswant0, Thank you for creating this issue. We will investigate it and provide feedback as soon as we have some updates. |
Hi @dwisiswant0, After trying to replicate the issue based on provided workflow, it appears that everything is functioning correctly and were able to install Go version 1.18.10 successfully without encountering any errors on our end. Here's a screenshot for your reference. ![]() |
Hi @dwisiswant0, The issue you're encountering is related to how environment variables, particularly the PATH, are handled during the workflow execution. In the Build PCRE2 on Windows step, you modify the PATH environment variable within PowerShell (pwsh) to include the build directory. However, this change may not propagate correctly to subsequent steps, such as the setup-go action, which relies on PowerShell being correctly set in the environment.
Attached is a screenshot of the workflow successfully completing the setup-go action after implementing the fix: ![]() |
I see what you're doing here - gowridurgad/pcregexp@dca5770, and I appreciate the approach, @gowridurgad. But, wasn't the |
Hi @dwisiswant0, After further investigation, we found that the issue you are encountering is related to how the PATH environment variable is being set. In the original line: This command replaces the entire PATH variable with only the path to the build directory. As a result, any default system paths that are necessary for finding executables are removed, which causes errors during later steps (e.g., Go installation). The corrected version: appends the new directory (build) to the existing PATH, ensuring that the system can still find the necessary tools and executables without losing access to important default directories. ![]() |
Description:
Failed to download version 1.18.10: Error: Unable to locate executable file: powershell.
Action version:
Specify the action version
Platform:
Runner type:
Tools version:
go1.18.x
Repro steps:
Expected behavior:
Successfully set up Go.
Actual behavior:
The text was updated successfully, but these errors were encountered: