diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-02-14 12:23:17 +0100 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-02-14 12:23:17 +0100 |
commit | 8202135137e19eb14bf80aa58b6afebeb2137336 (patch) | |
tree | 62a3303c0461c30ec3cb9245eeb520c36897049d /SBO-Lib/lib | |
parent | 95960b27b49901175783e05105f00685c85b97a2 (diff) | |
download | sbotools2-8202135137e19eb14bf80aa58b6afebeb2137336.tar.xz |
Change unsupported conditional declarations to proper code
Diffstat (limited to 'SBO-Lib/lib')
-rw-r--r-- | SBO-Lib/lib/SBO/Lib.pm | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/SBO-Lib/lib/SBO/Lib.pm b/SBO-Lib/lib/SBO/Lib.pm index e50c04c..1355a38 100644 --- a/SBO-Lib/lib/SBO/Lib.pm +++ b/SBO-Lib/lib/SBO/Lib.pm @@ -1336,12 +1336,11 @@ sub process_sbos { push @symlinks, @$temp_syms; } } - my $count = 0 unless $args{NON_INT}; + my $count = 0; FIRST: for my $sbo (@$todo) { $count++; - my $options = 0; - $options = $$opts{$sbo} if defined $$opts{$sbo}; - my $cmds = $$cmds{$sbo} if defined $$cmds{$sbo}; + my $options = $$opts{$sbo} // 0; + my $cmds = $$cmds{$sbo} // []; for my $cmd (@$cmds) { system($cmd) == 0 or warn "\"$cmd\" exited non-zero\n"; } @@ -1360,7 +1359,7 @@ sub process_sbos { # return now if we're not interactive return \@failures, $exit if $args{NON_INT}; # or if this is the last $sbo - return \@failures, $exit if $count == @$todo; + return \@failures, $exit if !$args{NON_INT} and $count == @$todo; say "Failure encountered while building $sbo:"; say " $fail"; print 'Do you want to proceed [n] '; |