Skip to content

Commit 01f2d2b

Browse files
committed
fix: stop multistage before it starts
1 parent 200ba93 commit 01f2d2b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/ux/multiStageOutput.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77

88
import { MultiStageOutput as OclifMultiStageOutput, MultiStageOutputOptions } from '@oclif/multi-stage-output';
99

10-
/**
11-
* This class is a light wrapper around MultiStageOutput that allows us to
12-
* automatically suppress any actions if `--json` flag is present.
13-
*/
1410
export class MultiStageOutput<T extends Record<string, unknown>> extends OclifMultiStageOutput<T> {
1511
public constructor(opts: MultiStageOutputOptions<T> & { outputEnabled: boolean }) {
16-
if (opts.outputEnabled) super(opts);
12+
const { outputEnabled, ...rest } = opts;
13+
super(rest);
14+
if (!outputEnabled) {
15+
this.stop();
16+
}
1717
}
1818
}

0 commit comments

Comments
 (0)