Skip to content

Format of path to executable not compatible on self-hosted Windows with nektos/act #1066

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

Closed
3 of 6 tasks
CodeFHD opened this issue Mar 26, 2025 · 5 comments
Closed
3 of 6 tasks
Assignees
Labels
bug Something isn't working

Comments

@CodeFHD
Copy link

CodeFHD commented Mar 26, 2025

Description:
I am trying to run the following action locally using nektos/act:
https://github.com/LuxCoreRender/LuxCore/blob/for_v2.10/.github/workflows/wheel-builder.yml

This workflow calls pypa/cibuildwheel@v2.22.0, which in turn calls actions/setup-python@v5

Afterwards, the python executable is called int eh following line, using steps.python.outputs.python-path
https://github.com/pypa/cibuildwheel/blob/094782a41d9824cd78939e3fb82f5cf65cb566b5/action.yml#L37C1-L37C62

The issue has initially been reported with naktos/act:
nektos/act#2704

After fruther investigation, the issue appears to be related to the form of the path in the output, using only single-backslash in a Windows-style-path C:\Users\.... Any windows-bash flavor I tried does not support this particular format, as elaborated in the nektos/act issue linked above.
A quick test by modifying cibuildhweels to replace back-slash with forward-slash appears to make this step work.

Wanted to forward this issue here. Perhaps there are additional instructions that I did not find so far?
Or else, the output format might be changed?

I did not see anything related in other Issues on this repository that contain Windows as a search term.

Action version:
v5

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted
  • nektos/act

Tools version:
3.11, others not tested

Repro steps:
A description with steps to reproduce the issue. If your have a public example or repo to share, please provide the link.

Expected behavior:
See above

Actual behavior:
See above

@suyashgaonkar
Copy link

Hi @CodeFHD ,Thank you for creating this issue. We will investigate it and provide feedback as soon as we have some updates.

@priyagupta108 priyagupta108 self-assigned this Mar 27, 2025
@priyagupta108
Copy link
Contributor

Hi @CodeFHD 👋,
The problem arises because the Windows-style path with backslashes (e.g., C:\Users\...) is not supported in the bash-like environment. This isn’t an issue with actions/setup-python itself, but rather with the bash environment not being able to properly handle Windows paths in their native format, which leads to errors.

It's important to note that C:\Users\... is a valid Windows path, as outlined in the Microsoft Docs. However, bash and other Linux-based tools expect paths in a Unix-style format, using forward slashes / instead of backslashes.

There is a related issue in the nektos/act repository: nektos/act#2424, which highlights a similar problem.

As a workaround, converting Windows paths to the appropriate Unix-style format should resolve the issue.

@priyagupta108
Copy link
Contributor

@CodeFHD👋, just a quick follow-up on the previous comment. Hope this helps clarify the situation. Please let us know if there are any concerns. Thanks!

@CodeFHD
Copy link
Author

CodeFHD commented Apr 14, 2025

Hi @priyagupta108, good of you to ping, I did not get a notification about your previous response.

I agree, of course, that the path is technically valid. In my use case, setup-python is used within another action (https://github.com/pypa/cibuildwheel) and then the act-environment, so that left to figure out where to solve it.
As this action is the source, it would seem the most universal solution to have an output with the widest compatibility, but I understand that it may not be a preferred solution.
Forking an action and maintaining a custom modified version, while technically not impossible, is rather impractical.

I might follow this up at https://github.com/pypa/cibuildwheel when I have time to do some further tests. It is not a pressing issue for us to have this process working with act on Windows, so it won't be high priority on my side anyways.

If you don't intend to make any modifications to setup-python, feel free to close this issue.

@priyagupta108
Copy link
Contributor

Hi @CodeFHD, thank you for your response!

The behavior you're experiencing stems from how different environments (such as Bash on Windows) handle path formats. This is more closely related to environment-specific configurations rather than the functionality of the setup-python action itself.

Since the action is functioning as designed, we do not plan to make any changes at this time and will be closing this issue for now. However, if you have any further questions or need additional assistance with the setup-python action, please feel free to reach out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants