Skip to content

Commit

Permalink
Merge pull request #1286 from saschagrunert/error-wrap
Browse files Browse the repository at this point in the history
Fix wrong error return value
  • Loading branch information
rhatdan committed Jul 13, 2022
2 parents 0b04426 + 5f2d250 commit 8e967aa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/devmapper/device_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,5 +245,8 @@ func setupDirectLVM(cfg directLVMConfig) error {
}

out, err = exec.Command("lvchange", "--metadataprofile", "storage-thinpool", "storage/thinpool").CombinedOutput()
return fmt.Errorf("%v: %w", string(out), err)
if err != nil {
return fmt.Errorf("%s: %w", string(out), err)
}
return nil
}

0 comments on commit 8e967aa

Please sign in to comment.