mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #1766] Windows build backslash issue #861
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#861
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 @benbaker76 on GitHub (Apr 25, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/1766
Bug report info
Command used with act
Describe issue
Build fails because the folder used is
C:Usersheadk.cacheact8828939fe4ffb927act/workflow/2when it should beC:/Users/headk/.cache/act/8828939fe4ffb927/act/workflow/2.It looks like it's removing backslashes from the path.
Link to GitHub repository
No response
Workflow content
Relevant log output
Additional information
No response
@benbaker76 commented on GitHub (Apr 28, 2023):
I made the following change in
host_environment.goand it successfully builds.Output:
Do you want a pull request?
@ChristopherHX commented on GitHub (Apr 28, 2023):
I don't think that running
msys2 C:\Users\headk\.cache\act\8828939fe4ffb927\act\workflow\2is a bug from act.\is a valid PATH seperator on windows. Use a different shell syntax, e.g. convert\to/within the shell and run the script after that. (msys2 -c "msys2 $(echo '{0}' | sed 's|\\|/|g')", I don't claim that this works)@benbaker76 commented on GitHub (Apr 28, 2023):
I see backslash replacements in other parts of this tool such as here and here so I don't see why it's not a valid solution to do the same for
GetActPath?@ChristopherHX commented on GitHub (Apr 28, 2023):
The code you are quoting is for linux container,
\is an escape char on linux.Seems like the cmd doesn't break while seeing
cmd /D /E:ON /V:OFF /S /C "CALL tes443/test.bat", so my concerns are resolved. Create a PR if you want, I'm not the only one who can merge this for you.