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

MANPATH: unbound variable #1413

Closed
vitalymak opened this issue Mar 6, 2017 · 1 comment
Closed

MANPATH: unbound variable #1413

vitalymak opened this issue Mar 6, 2017 · 1 comment
Labels
bugs Oh no, something's broken :-(

Comments

@vitalymak
Copy link

I have such use-case when I try to load NVM but I don't have MANPATH environment variable set.

macOS 10.12.3

  • nvm debug output:
nvm --version: v0.33.1
$SHELL: /bin/bash
$HOME: /Users/vitaly
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
$NVM_NODEJS_ORG_MIRROR: 'https://nodejs.org/dist'
$NVM_IOJS_ORG_MIRROR: 'https://iojs.org/dist'
nvm current: v6.9.4
which node: $NVM_DIR/versions/node/v6.9.4/bin/node
which iojs:
which npm: $NVM_DIR/versions/node/v6.9.4/bin/npm
npm config get prefix: $NVM_DIR/versions/node/v6.9.4
npm root -g: $NVM_DIR/versions/node/v6.9.4/lib/node_modules
  • What steps did you perform?
nvm deactivate
set -o nounset # unset variables are errors 
unset MANPATH
. ~/.nvm/nvm.sh
  • What happened?
-bash: MANPATH: unbound variable
  • What did you expect to happen?

Successful loading of NVM.

@ljharb
Copy link
Member

ljharb commented Mar 6, 2017

Thanks for the report and the great repro steps!

@ljharb ljharb added the bugs Oh no, something's broken :-( label Mar 6, 2017
@ljharb ljharb closed this as completed in fa22d71 Mar 6, 2017
PeterDaveHello added a commit to PeterDaveHello/nvm that referenced this issue Mar 15, 2017
By manpath's man page in Ubuntu 16.04:

> If $MANPATH is set, manpath will simply display its contents and issue
> a warning.

By fa22d71 for nvm-sh#1413, `nvm` now will
declare the "MANPATH" variable, no matter if it's set or not, so in the
situation that $MANPATH is set, you'll get the warning:

> manpath: warning: $MANPATH set, ignoring /etc/manpath.config
PeterDaveHello added a commit to PeterDaveHello/nvm that referenced this issue Mar 18, 2017
By manpath's man page in Ubuntu 16.04:

> If $MANPATH is set, manpath will simply display its contents and issue
> a warning.

By fa22d71 for nvm-sh#1413, `nvm` now will
declare the "MANPATH" variable, no matter if it's set or not, so in the
situation that $MANPATH is set, you'll get the warning:

> manpath: warning: $MANPATH set, ignoring /etc/manpath.config
edwmurph pushed a commit to edwmurph/nvm that referenced this issue Apr 9, 2018
edwmurph pushed a commit to edwmurph/nvm that referenced this issue Apr 9, 2018
By manpath's man page in Ubuntu 16.04:

> If $MANPATH is set, manpath will simply display its contents and issue
> a warning.

By fa22d71 for nvm-sh#1413, `nvm` now will
declare the "MANPATH" variable, no matter if it's set or not, so in the
situation that $MANPATH is set, you'll get the warning:

> manpath: warning: $MANPATH set, ignoring /etc/manpath.config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugs Oh no, something's broken :-(
Projects
None yet
Development

No branches or pull requests

2 participants