]> git.proxmox.com Git - pve-container.git/commitdiff
pct: correctly handle warnings task status
authorFabian Ebner <f.ebner@proxmox.com>
Wed, 12 May 2021 12:32:56 +0000 (14:32 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 21 Jun 2021 08:45:44 +0000 (10:45 +0200)
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
src/PVE/CLI/pct.pm

index 4dc9b0e8ae62ceb779184624da8245b59fe255fc..8c40bbeb5dcd3ef630aaf2cb2892ddedc6fd077e 100755 (executable)
@@ -30,7 +30,7 @@ my $nodename = PVE::INotify::nodename();
 my $upid_exit = sub {
     my $upid = shift;
     my $status = PVE::Tools::upid_read_status($upid);
-    exit($status eq 'OK' ? 0 : -1);
+    exit(PVE::Tools::upid_status_is_error($status) ? -1 : 0);
 };
 
 sub setup_environment {