Skip to content

Commit 6cfaede

Browse files
committed
[Fix] install: better error message when xcode command line tools are needed
Fixes #2697. Fixes #2663.
1 parent 1875fe8 commit 6cfaede

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

install.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,12 @@ nvm_do_install() {
356356
exit 1
357357
fi
358358
fi
359+
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
360+
nvm_echo >&2 'You may be on a Mac, and need to install the Xcode Command Line Developer Tools.'
361+
# shellcheck disable=SC2016
362+
nvm_echo >&2 'If so, run `xcode-select --install` and try again. If not, please report this!'
363+
exit 1
364+
fi
359365
if [ -z "${METHOD}" ]; then
360366
# Autodetect install method
361367
if nvm_has git; then

0 commit comments

Comments
 (0)