We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 200ba93 commit 01f2d2bCopy full SHA for 01f2d2b
src/ux/multiStageOutput.ts
@@ -7,12 +7,12 @@
7
8
import { MultiStageOutput as OclifMultiStageOutput, MultiStageOutputOptions } from '@oclif/multi-stage-output';
9
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
- */
14
export class MultiStageOutput<T extends Record<string, unknown>> extends OclifMultiStageOutput<T> {
15
public constructor(opts: MultiStageOutputOptions<T> & { outputEnabled: boolean }) {
16
- if (opts.outputEnabled) super(opts);
+ const { outputEnabled, ...rest } = opts;
+ super(rest);
+ if (!outputEnabled) {
+ this.stop();
+ }
17
}
18
0 commit comments