gugod / App-perlbrew

Manage perl installations in your $HOME
https://perlbrew.pl
Other
723 stars 220 forks source link

perlbrew.pm (~perl5/perlbrew/etc/bashrc) ; export PATH issue #482

Open brxfork opened 9 years ago

brxfork commented 9 years ago

With win7+babun(cygwin), I got an error during terminal init (bashrc script). PATH variable is broken because of special characters in it : space; parens.

__perlbrew_set_path:export:2: not valid in this context: (x86)/UpdatEngine

In my case, because of the "Program Files (x86)" and "UpdatEngine client" folders.

It seems the issue can be resolved with some double-quotes.

__perlbrew_set_path () {
export MANPATH="$PERLBREW_MANPATH${PERLBREW_MANPATH:+:}$(__perlbrew_purify \"$(manpath 2>/dev/null)\")"
#export MANPATH=$PERLBREW_MANPATH${PERLBREW_MANPATH:+:}$(__perlbrew_purify "$(manpath 2>/dev/null)")
export PATH="${PERLBREW_PATH:-$PERLBREW_ROOT/bin}:$(__perlbrew_purify \"$PATH\")"
#export PATH=${PERLBREW_PATH:-$PERLBREW_ROOT/bin}:$(__perlbrew_purify "$PATH")
hash -r
}

I hope this will help.

msoutopico commented 9 years ago

It seems to work for me too. Thanks a lot.