mirror of
https://github.com/nektos/act.git
synced 2026-04-26 17:35:49 +03:00
[GH-ISSUE #2704] Windows workflow execution fails, paths not resolved #1224
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#1224
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @CodeFHD on GitHub (Mar 22, 2025).
Original GitHub issue: https://github.com/nektos/act/issues/2704
Bug report info
Command used with act
Describe issue
I am trying to locally run a workflow from the LuxCoreRender/LuxCore repository, see below.
It works on GitHub actions for all OS configurations, and I can run it locally on linux using act (on a seaprate PC, not inside WSL, just to be clear).
Running it on Windows, I am stuck at the following error:
The file exists and contains the command that is supposed to be run for this step of the workflow.
I suspect the error is because the windows path
C:/...is not resolved to/mnt/c/...as it would be accessible inside WSL.I could not find any solution to this problem online so far, neither in the context of act or plain Docker.
I did attempt to reinstall WSL and Docker, but without change.
Any help to solve or further debug this would be appreciated.
Link to GitHub repository
https://github.com/LuxCoreRender/LuxCore/blob/for_v2.10/.github/workflows/wheel-builder.yml
Workflow content
Relevant log output
Additional information
No response
@ChristopherHX commented on GitHub (Mar 22, 2025):
FYI you need
bash.exeof mingw, msys, cygwin, or the one of git for windows in yourPATHbefore system32.Removing wsl2 removes
before system32requirementwsl bash can work if you use a custom
shelland do some magic, but this is not act specific at all.@CodeFHD commented on GitHub (Mar 22, 2025):
Thanks! That seems to have helped.
I had a fresh installation of cygwin, but it was not on path. bash.exe was only found in system32. (neither from mingw or git for windows.)
After appending
C:\cygwin64\binto the beginning of path, the error disappeared.I still get another error causing the workflow to fail. I will investigate further. If that seems unrelated to the path issue, I will close this.
@CodeFHD commented on GitHub (Mar 22, 2025):
Update: I do get a similar error in a later step when another github action is called. (pypa/cibuildwheel)
It appears the output
${{ steps.python.outputs.python-path }}in this linegithub.com/pypa/cibuildwheel@462c99589a/action.yml (L37C10-L37C49)hasn't been converted. This is generated by actions/setup-python@v5[EDIT 23.03.: Edited the path because due to markdown it was not dispalyed correctly - backslash before
.cachewas not displayed.]@ChristopherHX commented on GitHub (Mar 23, 2025):
Act does not aim to alter outputs generated by actions, the shell path used forward slashes
/just because someone opened an issue here and this increases compatibility a bit for some bash for windows.@CodeFHD commented on GitHub (Mar 23, 2025):
That's exactly the point (again): The path is valid, and python.exe is there.
I have tested the Cygwin-bash, which is now the first on PATH. While it generally accepts Windows-Style paths, it seems to require either single-forward- or double-back-slash everywhere except after the drive letter:
C:/Users/johannesis validC:\\Users\\johannesis validC:\Users\\johannesis validC:\Users\johannesis NOT validYou had suggested shells provided by mingw, git, or msys as further alternatives. I could try to supply those and see if they respond differently.
If that doesn't work, I suppose I should follow-up with and issue at actions/setup-python, based on your last comment?
P.S.: There was a small markdown error in the path (
johannes.cacheshould have beenjohannes\.cache). Just to not spark confusion, I will edit it above.@CodeFHD commented on GitHub (Mar 26, 2025):
I had no further success with other shells.
Reported this upstream to actions/setup-python:
https://github.com/actions/setup-python/issues/1066
@mfncooper commented on GitHub (Nov 16, 2025):
Similarly, built-in variables are not being converted on Windows when the shell is bash. For example:
results in:
The resultant path made available to bash, as shown on the last line above, is unusable, so subsequent steps, such as running
cmakein the${{github.workspace}}/builddirectory fail miserably. When the shell is set tobash, path variables need to be converted first.Command line used for the above was: