Skip to content

Commit

Permalink
do not fail if we use debug mode or new -p option
Browse files Browse the repository at this point in the history
Maybe this should never fail, because a disk without disk label
provide information about sizes But in the code we try to create a
disk label before, so it's maybe OK to fail if $FAI::no_dry_run is set.
  • Loading branch information
Mrfai committed Feb 16, 2024
1 parent 33c7d2b commit 6d2143b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/setup-storage/Volumes.pm
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ sub get_current_disks {
&FAI::execute_ro_command("parted -sm $disk unit B print", \@parted_print, 0);
}

($error eq "") or die "Failed to read the partition table from $disk\n";
($error ne "" && $FAI::no_dry_run) &&
die "Failed to read the partition table from $disk\n";

# disk is usable
&FAI::push_command( "true", "", "exist_$disk" );
Expand Down

0 comments on commit 6d2143b

Please sign in to comment.