Add return value assignments

This commit is contained in:
Shrenuj Bansal 2022-08-10 17:36:38 -04:00
parent f390c186e6
commit 10dba44638
2 changed files with 8 additions and 2 deletions

View File

@ -131,7 +131,10 @@ var stopCmd = &cli.Command{
ctx := lcli.ReqContext(cctx) ctx := lcli.ReqContext(cctx)
// Detach any storage associated with this worker // Detach any storage associated with this worker
api.StorageDetachAll(ctx) err = api.StorageDetachAll(ctx)
if err != nil {
return err
}
err = api.Shutdown(ctx) err = api.Shutdown(ctx)
if err != nil { if err != nil {

View File

@ -154,7 +154,10 @@ func (w *Worker) StorageDetachAll(ctx context.Context) error {
} }
for _, lp := range lps { for _, lp := range lps {
w.LocalStore.ClosePath(ctx, lp.ID) err = w.LocalStore.ClosePath(ctx, lp.ID)
if err != nil {
return xerrors.Errorf("unable to close path: %w", err)
}
} }
return nil return nil