fix git.sh

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
This commit is contained in:
Jiahao XU 2024-07-17 15:28:40 +10:00 committed by GitHub
parent e5666ad7d4
commit a33f79c5dd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -48,7 +48,11 @@ cp -r manifests/workspace/* "$GIT"
)
COMMIT_HASH="$(cd "$GIT" && git rev-parse HEAD)"
source="(git+file://$(cygpath -m "$GIT")#$COMMIT_HASH)"
if [ "$OSTYPE" = "cygwin" ] || [ "$OSTYPE" = "msys" ]; then
source="(git+file:///$(cygpath -m "$GIT")#$COMMIT_HASH)"
else
source="(git+file://$GIT#$COMMIT_HASH)"
fi
# Install cargo-binstall using `--git`
"./$1" binstall --force --git "file://$GIT" --no-confirm cargo-binstall