Skip to content

Commit

Permalink
fix: stop spinners on caught error
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc committed Sep 28, 2023
1 parent 34dde27 commit c3242a7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sfCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,9 @@ export abstract class SfCommand<T> extends Command {

// eslint-disable-next-line @typescript-eslint/require-await
protected async catch(error: Error | SfError | SfCommand.Error): Promise<SfCommand.Error> {
// stop any spinners to prevent it from unintentionally swallowing output.
// If there is an active spinner, it'll say "Error" instead of "Done"
this.spinner.stop(StandardColors.error('Error'));
// transform an unknown error into one that conforms to the interface

// @ts-expect-error because exitCode is not on Error
Expand Down

0 comments on commit c3242a7

Please sign in to comment.