Propagate error instead of log.Fatalf()

Signed-off-by: Guillaume Rose <guillaume.rose@docker.com>
This commit is contained in:
Guillaume Rose 2019-06-08 22:50:22 +02:00
parent 66cd2b6ee5
commit 65f3d9bcc1

View File

@ -65,7 +65,7 @@ func extend(d, fsType string) error {
data, err := exec.Command("sfdisk", "-J", d).Output()
if err != nil {
log.Fatalf("Unable to get drive data for %s from sfdisk: %v", d, err)
return fmt.Errorf("Unable to get drive data for %s from sfdisk: %v", d, err)
}
f := Fdisk{}