Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Add missing "command" prefixes for few commands #1736

Merged
merged 1 commit into from
Feb 24, 2018

Conversation

PeterDaveHello
Copy link
Collaborator

Just take a deeper look to find out those commands suppose to have command prefix but was missing, so fix now.

nvm.sh Outdated
@@ -104,7 +104,7 @@ nvm_download() {
if nvm_curl_use_compression; then
CURL_COMPRESSED_FLAG="--compressed"
fi
curl --fail ${CURL_COMPRESSED_FLAG:-} -q "$@"
command curl --fail ${CURL_COMPRESSED_FLAG:-} -q "$@"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i feel like i left this one as-is for some reason; can you try git blame-ing this line?

(i think there's probably people that alias or shadow curl, and this would break them)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I traced it, at least can trace back to #452, didn't see that reason yet, what do you think?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it'll break our tests, as they are shadow curl in fact ... maybe we should use a stronger mock method like to temporarily override the curl binary or something like that? It'll increase the complexity, but I'm not sure if it'll be good to not use the command prefix just because we want simpler tests.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's skip the prefix on curl for now; we can address that in a future PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, we have command prefix in nvm debug, as it's not tested, maybe we can still keep the one on the curl not tested?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since some tests require curl be un-prefixed, i think all curls should be unprefixed, including in nvm debug.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I think we should separate that change another place, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted that prefix added here for curl.

@PeterDaveHello PeterDaveHello force-pushed the fix-command-prefixes branch 2 times, most recently from 43722f1 to 94d2920 Compare February 21, 2018 09:45
@PeterDaveHello
Copy link
Collaborator Author

Hope we're good to go now :)

@ljharb ljharb added the shell alias clobbering Anything dealing with users shadowing builtins with aliases or functions. label Feb 24, 2018
@ljharb ljharb merged commit f3076d1 into nvm-sh:master Feb 24, 2018
@PeterDaveHello PeterDaveHello deleted the fix-command-prefixes branch February 25, 2018 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
shell alias clobbering Anything dealing with users shadowing builtins with aliases or functions.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants