diff options
Diffstat (limited to 'perl-install/lvm.pm')
-rw-r--r-- | perl-install/lvm.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/perl-install/lvm.pm b/perl-install/lvm.pm index 83d3e7896..6a6c250f9 100644 --- a/perl-install/lvm.pm +++ b/perl-install/lvm.pm @@ -56,7 +56,12 @@ sub lvm_cmd { } sub lvm_cmd_or_die { my ($prog, @para) = @_; - lvm_cmd($prog, @para) or die "$prog failed\n"; + my @err; + lvm_cmd("2>", \@err, $prog, @para) or do { + my $err = $err[-1]; # prevent "Modification of non-creatable array value attempted" + chomp($err); + die "$prog failed: $err\n"; + }; } sub check { |