do not print setup() arguments by default

This commit is contained in:
Johannes 'josch' Schauer 2018-09-24 20:09:43 +02:00
parent e7e6ec0314
commit b827e58d07
Signed by: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -552,17 +552,19 @@ sub run_apt_progress {
sub setup {
my $options = shift;
foreach my $key (sort keys %{$options}) {
my $value = $options->{$key};
if (!defined $value) {
next;
}
if (ref $value eq '') {
print STDERR "I: $key: $options->{$key}\n";
} elsif (ref $value eq 'ARRAY') {
print STDERR "I: $key: [" . (join ', ', @{$value}) . "]\n";
} else {
die "unknown type";
if (0) {
foreach my $key (sort keys %{$options}) {
my $value = $options->{$key};
if (!defined $value) {
next;
}
if (ref $value eq '') {
print STDERR "I: $key: $options->{$key}\n";
} elsif (ref $value eq 'ARRAY') {
print STDERR "I: $key: [" . (join ', ', @{$value}) . "]\n";
} else {
die "unknown type";
}
}
}