Skip to content

Commit

Permalink
feat: suppress progress bar output with env vars
Browse files Browse the repository at this point in the history
@W-10825418@
  • Loading branch information
peternhale committed Mar 10, 2022
1 parent 16cfb29 commit d2e8a84
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/sfCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@
*/
import * as os from 'os';
import { CliUx, Command, Config, HelpSection, Interfaces } from '@oclif/core';
import { envVars, Messages, SfProject, StructuredMessage, Lifecycle, Mode } from '@salesforce/core';
import {
envVars,
Messages,
SfProject,
StructuredMessage,
Lifecycle,
Mode,
EnvironmentVariable,
} from '@salesforce/core';
import { AnyJson } from '@salesforce/ts-types';
import chalk from 'chalk';
import { Progress, Prompter, Spinner, Ux } from './ux';
Expand Down Expand Up @@ -55,7 +63,7 @@ export abstract class SfCommand<T> extends Command {
super(argv, config);
const outputEnabled = !this.jsonEnabled();
this.spinner = new Spinner(outputEnabled);
this.progress = new Progress(outputEnabled);
this.progress = new Progress(outputEnabled && envVars.getBoolean(EnvironmentVariable.SF_USE_PROGRESS_BAR, true));
this.ux = new Ux(outputEnabled);
this.prompter = new Prompter();
this.lifecycle = Lifecycle.getInstance();
Expand Down

0 comments on commit d2e8a84

Please sign in to comment.