Skip to content
This repository was archived by the owner on Dec 2, 2020. It is now read-only.

Conversation

@eugeneius
Copy link
Contributor

nodenv version includes a description of how the version was selected:

$ nodenv version
5.0.0 (set by /opt/boxen/nodenv/version)

nodenv version-name prints the version number on its own:

$ nodenv version-name
5.0.0

Since the current_node function is intended to be used "in shell prompts and the like", the second shorter form is more appropriate.

This reverts the change from #56, which had the description:

nodenv version-name isn't a function

It is, though; defined here: https://github.com/OiNutter/nodenv/blob/master/libexec/nodenv-version-name

I suspect @DanielWright was stuck using wfarr/nodenv, which doesn't provide nodenv version-name: https://github.com/wfarr/nodenv/tree/master/libexec

...and I suspect that happened because of a bug in boxen/puppet-repository, which meant refs weren't updated when the remote was changed: boxen/puppet-repository#16

`nodenv version` includes a description of how the version was selected:

    $ nodenv version
    5.0.0 (set by /opt/boxen/nodenv/version)

`nodenv version-name` prints the version number on its own:

    $ nodenv version-name
    5.0.0

Since the current_node function is intended to be used "in shell prompts
and the like", the second shorter form is more appropriate.
@DanielWright
Copy link
Contributor

I suspect @DanielWright was stuck using wfarr/nodenv

You are correct. Thanks for making a more robust fix.

blackjid added a commit that referenced this pull request Jan 4, 2016
Use nodenv version-name in shell helper function
@blackjid blackjid merged commit cc6c459 into boxen:master Jan 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants