Skip to content

Commit

Permalink
Invoke curl without using user's ~/.curlrc config (#224)
Browse files Browse the repository at this point in the history
The idea is that a `~/.curlrc` can contain options that change the output, like `-w`, which can cause downstream tooling (like `tar`) to fail.

In this case, we want `curl` to behave consistently regardless of how the user has configured curl.

Fix #223
  • Loading branch information
bcspragu committed Apr 28, 2024
1 parent c69e5d1 commit 41d6c4e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion functions/_nvm_index_update.fish
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ function _nvm_index_update

set --local index $nvm_data/.index

if not command curl --location --silent $nvm_mirror/index.tab >$index.temp
if not command curl -q --location --silent $nvm_mirror/index.tab >$index.temp
command rm -f $index.temp
echo "nvm: Can't update index, host unavailable: \"$nvm_mirror\"" >&2
return 1
Expand Down
2 changes: 1 addition & 1 deletion functions/nvm.fish
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function nvm --description "Node version manager"
echo -e "Fetching \x1b[4m$url\x1b[24m\x1b[7m"
end

if ! command curl $silent --progress-bar --location $url |
if ! command curl -q $silent --progress-bar --location $url |
command tar --extract --gzip --directory $nvm_data/$ver 2>/dev/null
command rm -rf $nvm_data/$ver
echo -e "\033[F\33[2K\x1b[0mnvm: Invalid mirror or host unavailable: \"$url\"" >&2
Expand Down

0 comments on commit 41d6c4e

Please sign in to comment.