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

'perlbrew use' clobbers user-set PATH #279

Closed
aixtal opened this issue Jan 23, 2013 · 0 comments
Closed

'perlbrew use' clobbers user-set PATH #279

aixtal opened this issue Jan 23, 2013 · 0 comments

Comments

@aixtal
Copy link
Contributor

aixtal commented Jan 23, 2013

I keep a number of tools under
~/perl5/perlbrew/perls/perl-5.16.2/mystuff
which I add to my $PATH in my .bashrc.

However, when "perlbrew use perl-5.16.2@foo" launches a subshell, it seems to replace anything starting with ~/perl5/perlbrew/perls/perl-5.16.2 in the current $PATH by the new path. Therefore, my path is lost.

It seems that line 1323 in v0.58 :

$env{PATH} = $env{PERLBREW_PATH} . ":" . join ":", grep { !/$root/ } split ":", $ENV{PATH};

should be replaced by :

$env{PATH} = $env{PERLBREW_PATH} . ":" . join ":", grep { !/$root/bin/ } split ":", $ENV{PATH};

unless of course there are implications that I do not see.

Thanks!

aixtal added a commit to aixtal/App-perlbrew that referenced this issue Jan 24, 2013
gugod added a commit that referenced this issue Feb 10, 2013
@aixtal aixtal closed this as completed Feb 14, 2013
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

No branches or pull requests

1 participant