Skip to content

Commit

Permalink
fix(fixture): support running fixtures on mingw64 (#708)
Browse files Browse the repository at this point in the history
Signed-off-by: Bukowa <gitbukowa@gmail.com>
  • Loading branch information
bukowa authored Jun 15, 2024
1 parent bea4916 commit dabe716
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/fixtures/test-fixtures-locally.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@ git init
# Commit
"$FIXTURES_DIR/commit.sh"

# 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

# Show results
echo -e "\n---Run git-cliff---"
cargo run --manifest-path "$SCRIPT_DIR/../../Cargo.toml" -- -vv --config "$FIXTURES_DIR/cliff.toml" "${@:2}"

0 comments on commit dabe716

Please sign in to comment.