Skip to content

Commit 92166f6

Browse files
sureshe456Suresh kumarCopilot
authored
[macOS]Pin Git to 2.50.1 version (#12954)
* [macOS]Pin Git to 2.50.1 version * Update images/macos/scripts/build/install-git.sh Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Suresh kumar <v-erkumar@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 2f8d6ab commit 92166f6

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

images/macos/scripts/build/install-git.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,15 @@
77
source ~/utils/utils.sh
88

99
echo "Installing Git..."
10-
brew_smart_install "git"
10+
#brew_smart_install "git"
11+
12+
# pin Git to 2.50.1 due to problems in the latest Git version 2.51.0
13+
COMMIT=6b39030bc0d0a0a8df99afe37e5ae4d61ba07c88
14+
FORMULA_URL="https://raw.githubusercontent.com/Homebrew/homebrew-core/$COMMIT/Formula/g/git.rb"
15+
FORMULA_PATH="$(brew --repository)/Library/Taps/homebrew/homebrew-core/Formula/g/git.rb"
16+
mkdir -p "$(dirname $FORMULA_PATH)"
17+
curl -fsSL $FORMULA_URL -o $FORMULA_PATH
18+
HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_FROM_API=1 brew install git
1119

1220
git config --global --add safe.directory "*"
1321

0 commit comments

Comments
 (0)