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

Improve readability & complexity by nvm_has_not_aliased_exec() #1443

Merged
merged 1 commit into from
Mar 22, 2017

Conversation

PeterDaveHello
Copy link
Collaborator

No description provided.

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

Thanks, this is a nice cleanup. Just a couple comments.

nvm.sh Outdated
@@ -39,6 +39,12 @@ nvm_has() {
type "${1-}" > /dev/null 2>&1
}

nvm_has_not_aliased_exec() {
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 name this nvm_has_non_aliased instead

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

update

nvm.sh Outdated
@@ -39,6 +39,12 @@ nvm_has() {
type "${1-}" > /dev/null 2>&1
}

nvm_has_not_aliased_exec() {
if ! nvm_has "${1-}" || nvm_is_alias "${1-}"; then
Copy link
Member

Choose a reason for hiding this comment

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

can this function body just be nvm_has "${1-}" && ! nvm_is_alias "${1-}"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

@ljharb ljharb added the needs followup We need some info or action from whoever filed this issue/PR. label Mar 21, 2017
@PeterDaveHello PeterDaveHello force-pushed the nvm_has_not_aliased_exec branch 2 times, most recently from 73ada3c to feabe9f Compare March 21, 2017 18:35
@ljharb ljharb merged commit fa3631f into nvm-sh:master Mar 22, 2017
@ljharb ljharb removed the needs followup We need some info or action from whoever filed this issue/PR. label Mar 22, 2017
@PeterDaveHello PeterDaveHello deleted the nvm_has_not_aliased_exec branch March 22, 2017 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants