From 36f914bf9c0a35e23fc9b0ee3116fc9be3763c10 Mon Sep 17 00:00:00 2001 From: Ryan Harper Date: Tue, 13 Feb 2024 15:51:36 -0600 Subject: [PATCH] fix: return err when addPartitionSetGPT fails Fix the thinko which returns nil when addPartitioSetGPT fails by returning the err instead of nil. Signed-off-by: Ryan Harper --- linux/disk.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/disk.go b/linux/disk.go index 215a665..6ae50ab 100644 --- a/linux/disk.go +++ b/linux/disk.go @@ -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 } }