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

Update action path to work on windows #32

Merged
merged 1 commit into from
Jan 30, 2023
Merged

Conversation

speedyleion
Copy link
Contributor

Previously the path to the action script was ${{ github.action_path }} which uses the native path format. On Windows machines this ends up passing paths with \ to bash, which bash tries to interpret as escape characters. "c:\a\b" would get interpreted as "c:ab".

Now the path replaces all instances of \ with / to work with bash on Windows. This assumes that \ would never be used on other github runners.

Solution was copied from actions/runner#1066

Previously the path to the action script was `${{ github.action_path }}`
which uses the native path format. On Windows machines this ends up
passing paths with `\` to bash, which bash tries to interpret as escape
characters. "c:\a\b" would get be interpreted as "c:ab".

Now the path replaces all instances of `\` with `/` to work with bash on
Windows. This assumes that `\` would never be used on other github
runners.

Solution was copied from actions/runner#1066
@speedyleion
Copy link
Contributor Author

This run, https://github.com/speedyleion/gh-difftool/actions/runs/4033773125 resulted in the following when running on a windows runner

Run D:\a\_actions\cli\gh-extension-precompile\v1/build_and_release.sh
D:\a\_temp\30533e1b-ddc7-4866-bdca-4b174a20c926.sh: line 1: D:a_actionscligh-extension-precompilev1/build_and_release.sh: No such file or directory
Error: Process completed with exit code 127.

This run https://github.com/speedyleion/gh-difftool/actions/runs/4035182759 used my fork and branch to succeed on windows

Copy link
Contributor

@mislav mislav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@mislav mislav merged commit 640911b into cli:trunk Jan 30, 2023
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

Successfully merging this pull request may close these issues.

2 participants