Skip to content

Commit

Permalink
Improve --result option heuristic
Browse files Browse the repository at this point in the history
Args starting with '.' can't be a package or a code.
  • Loading branch information
mlschroe committed Oct 11, 2024
1 parent 3183f2b commit 5cb7aba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PBuild/Options.pm
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ sub vm_type_special {
my ($opts, $opt, $origopt, $args) = @_;
my $arg;
$arg = Build::Options::getarg($origopt, $args, 1) unless $opt eq 'zvm' || $opt eq 'lxc';
$opts->{'vm-disk'} = $arg if defined $arg;
$opts->{'vm-type'} = $opt;
$opts->{'vm-disk'} = $arg if defined $arg;
}

sub ccache_special {
Expand All @@ -160,7 +160,7 @@ my %known_codes = map {$_ => 1} @codes;
sub result_rebuild_special {
my ($opts, $opt, $origopt, $args) = @_;
my $arg;
$arg = Build::Options::getarg($origopt, $args, 1) if @$args && (ref($args->[0]) || $args->[0] !~ /\//);
$arg = Build::Options::getarg($origopt, $args, 1) if @$args && (ref($args->[0]) || $args->[0] !~ /^\.|\//);
if (!defined($arg) || $arg eq 'all') {
push @{$opts->{"$opt-code"}}, 'all';
} elsif ($known_codes{$arg}) {
Expand Down

0 comments on commit 5cb7aba

Please sign in to comment.