Skip to content

$1: unbound variable #873

@funge

Description

@funge

On OS X El Capitan (had same issue on Mavericks) I have the following in my .bash_profile:

source $(brew --prefix nvm)/nvm.sh

Which ends up running:

/usr/local/opt/nvm/nvm.sh

Which gives the following error:

-bash: $1: unbound variable

Which seems to come from this part:

echo $1

In this function:

nvm_supports_source_options() {
  [ "_$(echo 'echo $1' | . /dev/stdin yes 2> /dev/null)" = "_yes" ]
}

Any help or guidance on what I'm doing wrong is appreciated.

Thanks!

Metadata

Metadata

Assignees

Labels

bugsOh no, something's broken :-(pull request wantedThis is a great way to contribute! Help us out :-Dshell: bash/sh

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions