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

[New] Print $TERM_PROGRAM in nvm debug if it exists #1578

Merged
merged 1 commit into from
Jul 14, 2017
Merged

[New] Print $TERM_PROGRAM in nvm debug if it exists #1578

merged 1 commit into from
Jul 14, 2017

Conversation

PeterDaveHello
Copy link
Collaborator

@PeterDaveHello PeterDaveHello commented Jul 12, 2017

Not sure if it exists anywhere else but macOS, may help debug in situation like #1553 and #1577

e.g.

  • iTerm.app
  • Hyper
  • Apple_Terminal

nvm.sh Outdated
@@ -2357,6 +2357,9 @@ nvm() {
setopt shwordsplit
fi
nvm_err "nvm --version: v$(nvm --version)"
if [ -n "$TERM_PROGRAM" ]; then
Copy link
Member

Choose a reason for hiding this comment

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

this needs ${TERM_PROGRAM-} to avoid errors if -x is set.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will there be a problem even in if condition? I thought i'll be caught?

Copy link
Member

Choose a reason for hiding this comment

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

the one inside the condition is safe; i'm pretty sure the one in the condition itself is not

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

hmmm ... didn't know that before, could learn something here, I'll figure it out :) Fixed now.

@ljharb ljharb merged commit ab591b0 into nvm-sh:master Jul 14, 2017
@PeterDaveHello PeterDaveHello deleted the enhance-nvm-debug branch July 14, 2017 10:08
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.

2 participants