From 01f2d2b7c7b6eee7d1dc377af6bf9fa37078dc2f Mon Sep 17 00:00:00 2001 From: Mike Donnalley Date: Fri, 16 Aug 2024 12:47:30 -0600 Subject: [PATCH] fix: stop multistage before it starts --- src/ux/multiStageOutput.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ux/multiStageOutput.ts b/src/ux/multiStageOutput.ts index a6483137..85141a2f 100644 --- a/src/ux/multiStageOutput.ts +++ b/src/ux/multiStageOutput.ts @@ -7,12 +7,12 @@ import { MultiStageOutput as OclifMultiStageOutput, MultiStageOutputOptions } from '@oclif/multi-stage-output'; -/** - * This class is a light wrapper around MultiStageOutput that allows us to - * automatically suppress any actions if `--json` flag is present. - */ export class MultiStageOutput> extends OclifMultiStageOutput { public constructor(opts: MultiStageOutputOptions & { outputEnabled: boolean }) { - if (opts.outputEnabled) super(opts); + const { outputEnabled, ...rest } = opts; + super(rest); + if (!outputEnabled) { + this.stop(); + } } }