Move err check so that it only executes if it is reassigned

This commit is contained in:
David Dworken 2023-10-08 20:26:33 -07:00
parent 717cf2c4b0
commit 45aa218bd3
No known key found for this signature in database

View File

@ -352,10 +352,10 @@ func ImportHistory(ctx context.Context, shouldReadStdin, force bool) (int, error
} }
return nil return nil
}) })
}
if err != nil { if err != nil {
return 0, err return 0, err
} }
}
err = Reupload(ctx) err = Reupload(ctx)
if err != nil { if err != nil {
return 0, fmt.Errorf("failed to upload hishtory import: %w", err) return 0, fmt.Errorf("failed to upload hishtory import: %w", err)