Skip to content

Commit

Permalink
fix: return err when addPartitionSetGPT fails
Browse files Browse the repository at this point in the history
Fix the thinko which returns nil when addPartitioSetGPT fails by
returning the err instead of nil.

Signed-off-by: Ryan Harper <[email protected]>
  • Loading branch information
raharper committed Feb 13, 2024
1 parent 02b41ac commit 36f914b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion linux/disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ func addPartitionSet(d disko.Disk, pSet disko.PartitionSet) error {
}
} else {
if err := addPartitionSetGPT(fp, d, pSet); err != nil {
return nil
return err

Check warning on line 658 in linux/disk.go

View check run for this annotation

Codecov / codecov/patch

linux/disk.go#L658

Added line #L658 was not covered by tests
}
}

Expand Down

0 comments on commit 36f914b

Please sign in to comment.