From: Graham Knop Date: Mon, 13 Jan 2014 16:02:12 +0000 (-0500) Subject: correct output for fish shell X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1730f48f02f596ea214aab12466dd6471a2990d7;p=p5sagit%2Flocal-lib.git correct output for fish shell --- diff --git a/lib/local/lib.pm b/lib/local/lib.pm index 6685519..216426b 100644 --- a/lib/local/lib.pm +++ b/lib/local/lib.pm @@ -448,7 +448,7 @@ sub build_fish_env_declaration { if (!defined $value) { return qq{set -e $name;\n}; } - $value =~ s/$_path_sep/ /; + $value =~ s/$_path_sep/ /g; qq{set -x $name $value;\n}; } diff --git a/t/shell.t b/t/shell.t index dc8fd1a..7ab7ef2 100644 --- a/t/shell.t +++ b/t/shell.t @@ -80,10 +80,11 @@ for my $shell (@shells) { local $ENV{PATH} = $root; local $ENV{PERL5LIB}; delete $ENV{PERL5LIB}; + my $bin_path = local::lib->install_base_bin_path($ll_dir); + mkdir $bin_path; my $env = call_ll($shell, "$ll"); is $env->{PERL_LOCAL_LIB_ROOT}, $ll_dir, "$shell->{name}: activate root"; - my $bin_path = local::lib->install_base_bin_path($ll_dir); like $env->{PATH}, qr/^\Q$bin_path$sep$root\E(?:$|\Q$sep\E)/, "$shell->{name}: activate PATH"; is $env->{PERL5LIB}, local::lib->install_base_perl_path($ll_dir),