mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
preinstall: correctly handle headless installs
This commit is contained in:
parent
f6a9980e49
commit
d2aed31387
@ -5,9 +5,12 @@ if [[ -e "/Library/Developer/CommandLineTools/usr/bin/git" ]]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if /usr/bin/xcode-select --install; then
|
if [[ -z "$COMMAND_LINE_INSTALL" ]]; then
|
||||||
exit 0
|
printf "No auto-install of CommandLine Tools in headless install!"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "Failed to install CommandLine Tools"
|
if ! /usr/bin/xcode-select --install; then
|
||||||
|
printf "Failed to install CommandLine Tools!"
|
||||||
exit 1
|
exit 1
|
||||||
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user