Skip to content

Commit

Permalink
Removed default check for curl, and placed it into nvm function
Browse files Browse the repository at this point in the history
This fixes issue with curl not being installed before nvm is initially sourced
and then curl subsequently being installed.

removed creation of global curl function (after error detected) which
overwrites the system tool, preventing execution of later installed
curl binary
  • Loading branch information
prozacgod committed Feb 24, 2012
1 parent 293061b commit 7c3af21
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions nvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ if [ ! -d "$NVM_DIR" ]; then
export NVM_DIR=$(cd $(dirname ${BASH_SOURCE[0]:-$0}); pwd)
fi

# Emulate curl with wget, if necessary
if [ ! `which curl` ]; then
NOCURL='nocurl'
curl() { echo 'Need curl to proceed.' >&2; }
fi

# Expand a version using the version cache
nvm_version()
{
Expand Down Expand Up @@ -75,6 +69,11 @@ print_versions()

nvm()
{
if [ ! `which curl` ]; then
echo 'NVM Needs curl to proceed.' >&2;
return
fi

if [ $# -lt 1 ]; then
nvm help
return
Expand Down

0 comments on commit 7c3af21

Please sign in to comment.