Skip to content

Loading…

Hotfix: correctly map curl's `-C -` to wget #474

Merged
merged 1 commit into from

3 participants

@mgol

wget doesn't need or accept the - parameter to -c

Without it, on a curl-less OS nvm install doesn't work since wget tries to download from http://-/ apart from the real Node file which causes the process to fail and makes nvm think the binary download didn't succeed.

So this is pretty critical to wget users.

Should wget nvm install be tested somehow? If it was, this issue wouldn't happen.

@mgol mgol changed the title from Correctly map curl's `-C -` to wget to Hotfix: correctly map curl's `-C -` to wget
@mgol mgol Hotfix: correctly map curl's `-C -` to wget
wget doesn't need or accept the `-` parameter to `-c`. This incorrect
mapping causes `nvm install` to fail on a curlless OS.
21fa842
@ljharb
Collaborator

Thanks! I'm not sure how to test any part of the install script, since Travis always has nvm (and curl anyways) pre-installed.

@ljharb ljharb merged commit 3b42df8 into creationix:master

1 check passed

Details continuous-integration/travis-ci The Travis CI build passed
@mgol mgol deleted the mgol:wget-hotfix branch
@mgol

@ljharb You could unload & uninstall nvm at the beginning of the test, couldn't you? With curl it's a little harder but perhaps it's possible to remove curl in a Travis test?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 16, 2014
  1. @mgol

    Hotfix: correctly map curl's `-C -` to wget

    mgol committed
    wget doesn't need or accept the `-` parameter to `-c`. This incorrect
    mapping causes `nvm install` to fail on a curlless OS.
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +1 −1 install.sh
  2. +1 −1 nvm.sh
View
2 install.sh
@@ -22,7 +22,7 @@ nvm_download() {
ARGS=${ARGS/-I /}
ARGS=${ARGS/-s /-q }
ARGS=${ARGS/-o /-O }
- ARGS=${ARGS/-C /-c }
+ ARGS=${ARGS/-C - /-c }
wget $ARGS
fi
}
View
2 nvm.sh
@@ -23,7 +23,7 @@ nvm_download() {
ARGS=${ARGS/-I /}
ARGS=${ARGS/-s /-q }
ARGS=${ARGS/-o /-O }
- ARGS=${ARGS/-C /-c }
+ ARGS=${ARGS/-C - /-c }
wget $ARGS
fi
}
Something went wrong with that request. Please try again.