Add return value assignments

This commit is contained in:
Shrenuj Bansal 2022-08-12 12:03:51 -04:00
parent dfb691b14a
commit 500f71c344
2 changed files with 8 additions and 2 deletions

View File

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

View File

@ -154,7 +154,10 @@ func (w *Worker) StorageDetachAll(ctx context.Context) error {
}
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