Skip to content

Commit

Permalink
fix(fetch): enable json flag for pool fetch command (dxatscale#1404)
Browse files Browse the repository at this point in the history
enable json flag for pool fetch command

Co-authored-by: Azlam <43767972+azlam-abdulsalam@users.noreply.github.com>
  • Loading branch information
RobinWeymans and azlam-abdulsalam authored Sep 16, 2023
1 parent d26480d commit f16dec3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/sfpowerscripts-cli/src/commands/pool/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default class Fetch extends SfpowerscriptsCommand {

protected static requiresDevhubUsername = true;
protected static requiresProject = true;
public static enableJsonFlag = true;

public static examples = [
`$ sfdx sfpowerkit:pool:fetch -t core `,
Expand Down Expand Up @@ -76,6 +77,8 @@ export default class Fetch extends SfpowerscriptsCommand {
await this.hubOrg.refreshAuth();
const hubConn = this.hubOrg.getConnection();

if (this.flags.json) SFPLogger.logLevel = LoggerLevel.HIDE;

SFPLogger.log(
COLOR_KEY_MESSAGE(`Fetching a scratch org from pool ${this.flags.tag} in Org ${this.hubOrg.getOrgId()}`),
LoggerLevel.INFO
Expand All @@ -100,8 +103,6 @@ export default class Fetch extends SfpowerscriptsCommand {
fetchImpl.setSourceTrackingOnFetch();
}

if (this.flags.json) SFPLogger.logLevel = LoggerLevel.HIDE;

let result = (await fetchImpl.execute()) as ScratchOrg;

if (!this.flags.json && !this.flags.sendtouser) {
Expand Down

0 comments on commit f16dec3

Please sign in to comment.