-
-
Notifications
You must be signed in to change notification settings - Fork 201
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
Fixture test script not working on Windows (MINGW64) #705
Labels
bug
Something isn't working
Comments
12 tasks
orhun
changed the title
.github/fixtures/test-fixtures-locally.sh not working on windows with MINGW64
Fixture test script not working on Windows (MINGW64)
Jun 15, 2024
It would be nice to detect if this is being run on Windows and set those environment variables. Unfortunately I don't have a Windows machine to test this. |
What do you think? Works for me. # Check if we are running on Windows with MINGW64 and if cygpath is available
if [ -n "$MSYSTEM" ] && [ "$MSYSTEM" = "MINGW64" ]; then
echo "Running inside MINGW64 trying to convert paths to Windows format."
if command -v cygpath > /dev/null 2>&1; then
# Convert the path to Windows format
SCRIPT_DIR=$(cygpath -w "$SCRIPT_DIR")
FIXTURES_DIR=$(cygpath -w "$FIXTURES_DIR")
else
echo "WARNING: cygpath command not found in the PATH. The script may not work correctly on Windows."
exit 1
fi
fi |
LGTM, feel free to send a PR! |
12 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there an existing issue for this?
Description of the bug
test-fixtures-locally.sh
is not working onWindows
when executed inbash
provided bygit
installation (C:\Program Files\Git\bin\bash.exe
$ .github/fixtures/test-fixtures-locally.sh test-date-order error: manifest path `/c/Users/buk/WebstormProjects/git-cliff/.github/fixtures/../../Cargo.toml` does not exist
Solution that works for me:
Steps To Reproduce
$ .github/fixtures/test-fixtures-locally.sh test-date-order error: manifest path `/c/Users/buk/WebstormProjects/git-cliff/.github/fixtures/../../Cargo.toml` does not exist
Expected behavior
It works.
Screenshots / Logs
No response
Software information
Additional context
Originally posted by @orhun in #696 (comment)
The text was updated successfully, but these errors were encountered: