mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-05-10 14:21:50 +00:00
[Fix] install
: better error message when xcode command line tools are needed
Fixes #2697. Fixes #2663.
This commit is contained in:
parent
1875fe8b40
commit
6cfaede5a0
@ -356,6 +356,12 @@ nvm_do_install() {
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
if nvm_has xcode-select && [ "$(xcode-select -p >/dev/null 2>/dev/null ; echo $?)" = '2' ] && [ "$(which git)" = '/usr/bin/git' ] && [ "$(which curl)" = '/usr/bin/curl' ]; then
|
||||
nvm_echo >&2 'You may be on a Mac, and need to install the Xcode Command Line Developer Tools.'
|
||||
# shellcheck disable=SC2016
|
||||
nvm_echo >&2 'If so, run `xcode-select --install` and try again. If not, please report this!'
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "${METHOD}" ]; then
|
||||
# Autodetect install method
|
||||
if nvm_has git; then
|
||||
|
Loading…
Reference in New Issue
Block a user