Skip to content

Commit

Permalink
fix: support setting json = true via env
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc committed Apr 25, 2023
1 parent b32529f commit a02f269
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/sfCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,11 @@ export abstract class SfCommand<T> extends Command {
return this.constructor as typeof SfCommand;
}

public jsonEnabled(): boolean {
// can come from either oclif's detection of the flag's presence and truthiness OR from the env
// https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_dev_cli_json_support.htm
return super.jsonEnabled() || envVars.getString(EnvironmentVariable.SF_CONTENT_TYPE) === 'JSON';
}
/**
* Log a success message that has the standard success message color applied.
*
Expand Down

0 comments on commit a02f269

Please sign in to comment.