From 6e5beb1366f8f5d4f90283a509d1a4b7b988e1a9 Mon Sep 17 00:00:00 2001 From: Kang-min Liu Date: Sun, 21 Nov 2021 08:25:16 +0900 Subject: [PATCH] exec: do not exclude aliases whet they are specified in `--with` The reason why we exclude aliases in `exec` is to avoid duplicate run. However, if users explicitly specify aliasses in `--with`, skipping those would be counter-intuitive. PR: https://github.com/gugod/App-perlbrew/issues/725 --- lib/App/perlbrew.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/App/perlbrew.pm b/lib/App/perlbrew.pm index 9e5430bc..ffc57505 100644 --- a/lib/App/perlbrew.pm +++ b/lib/App/perlbrew.pm @@ -2304,7 +2304,9 @@ sub run_command_exec { @exec_with = map { $installed{$_} } @with; } else { - @exec_with = map { ($_, @{$_->{libs}}) } $self->installed_perls; + @exec_with = grep { + not -l $self->root->perls( $_->{name} ); # Skip Aliases + } map { ($_, @{$_->{libs}}) } $self->installed_perls; } if ($opts{min}) { @@ -2328,7 +2330,6 @@ sub run_command_exec { my $overall_success = 1; for my $i ( @exec_with ) { - next if -l $self->root->perls ($i->{name}); # Skip Aliases my %env = $self->perlbrew_env($i->{name}); next if !$env{PERLBREW_PERL};