libpod: wrap store setup error message

In cases where we fail to configure the error is returned as it and may
be missing useful context. Make sure we know the error happened as part
of the storage setup.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger committed 2024-04-19 16:29:50 +02:00
1 parent db93e2cf2b
commit ce9054ff45
1 file changed
+2 -2
+2 -2
View File
@@ -438,7 +438,7 @@ func makeRuntime(ctx context.Context, runtime *Runtime) (retErr error) {
}
}
return err
return fmt.Errorf("configure storage: %w", err)
}
defer func() {
if retErr != nil && store != nil {
@@ -616,7 +616,7 @@ func makeRuntime(ctx context.Context, runtime *Runtime) (retErr error) {
// Ensure we have a store before refresh occurs
if runtime.store == nil {
if err := runtime.configureStore(); err != nil {
return err
return fmt.Errorf("configure storage: %w", err)
}
}