From 2552f24abb042176c79953187cd45e04060a7ec0 Mon Sep 17 00:00:00 2001 From: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Date: Wed, 17 Jul 2024 13:42:23 +1000 Subject: [PATCH] fixx git.sh for win Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --- e2e-tests/git.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/e2e-tests/git.sh b/e2e-tests/git.sh index 7296ef17..7ae8fa52 100644 --- a/e2e-tests/git.sh +++ b/e2e-tests/git.sh @@ -22,7 +22,7 @@ GIT="$(mktemp -d 2>/dev/null || mktemp -d -t 'git')" if [ "$OSTYPE" = "cygwin" ] || [ "$OSTYPE" = "msys" ]; then # Convert it to windows path so `--git "file://$GIT"` would work # on windows. - GIT="$(cygpath -m "$GIT")" + GIT="$(cygpath -w "$GIT")" fi git init "$GIT" @@ -49,13 +49,15 @@ cp -r manifests/workspace/* "$GIT" ) COMMIT_HASH="$(cd "$GIT" && git rev-parse HEAD)" +source="(git+file://$(cygpath -m "$GIT")#$COMMIT_HASH)" + # Install cargo-binstall using `--git` "./$1" binstall --force --git "file://$GIT" --no-confirm cargo-binstall test_cargo_binstall_install cat "$CARGO_HOME/.crates.toml" -grep -F "cargo-binstall 0.12.0 (git+file://$GIT#$COMMIT_HASH)" <"$CARGO_HOME/.crates.toml" +grep -F "cargo-binstall 0.12.0 $source" <"$CARGO_HOME/.crates.toml" # Install cargo-watch using `--git` "./$1" binstall --force --git "file://$GIT" --no-confirm cargo-watch @@ -66,4 +68,4 @@ echo "$cargo_watch_version" [ "$cargo_watch_version" = "cargo-watch 8.4.0" ] cat "$CARGO_HOME/.crates.toml" -grep -F "cargo-watch 8.4.0 (git+file://$GIT#$COMMIT_HASH)" <"$CARGO_HOME/.crates.toml" +grep -F "cargo-watch 8.4.0 $source" <"$CARGO_HOME/.crates.toml"