[pve-devel] [PATCH proxmox-ve v3 1/3] apt-hook: fix perlcritic warnings
Stoiko Ivanov
s.ivanov at proxmox.com
Fri Feb 11 16:15:45 CET 2022
Co-authored-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
debian/apthook/pve-apt-hook | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/debian/apthook/pve-apt-hook b/debian/apthook/pve-apt-hook
index 1f77a1a..2053fef 100755
--- a/debian/apthook/pve-apt-hook
+++ b/debian/apthook/pve-apt-hook
@@ -20,14 +20,16 @@ if (!defined $fd || $fd == 0) {
exit 0;
}
-open(my $fh, "<&=${fd}") or die "E: could not open APT_HOOK_INFO_FD (${fd}) - $!\n";
+open(my $fh, "<&=", $fd) or die "E: could not open APT_HOOK_INFO_FD (${fd}) - $!\n";
my $cleanup = sub {
my ($rc, $confirm) = @_;
close($fh);
- my $line = <STDIN> if $confirm;
+ if ($confirm) {
+ my $line = <STDIN>;
+ }
exit $rc;
};
--
2.30.2
More information about the pve-devel
mailing list