From 4ef8539d27c443df26453fefc640d50d56ce3773 Mon Sep 17 00:00:00 2001 From: "azlam.abdulsalam" Date: Tue, 5 Dec 2023 12:22:17 +1100 Subject: [PATCH] feat(fetch): remove dependency on project directory for a scratch org fetch This change will allow the usage of a scratch org on any directory, it will skip the source tracking as sfdx-project.json is not found --- packages/sfpowerscripts-cli/src/commands/pool/fetch.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/sfpowerscripts-cli/src/commands/pool/fetch.ts b/packages/sfpowerscripts-cli/src/commands/pool/fetch.ts index a521f97d7..c96fe9472 100644 --- a/packages/sfpowerscripts-cli/src/commands/pool/fetch.ts +++ b/packages/sfpowerscripts-cli/src/commands/pool/fetch.ts @@ -27,7 +27,6 @@ export default class Fetch extends SfpowerscriptsCommand { public static description = messages.getMessage('commandDescription'); protected static requiresDevhubUsername = true; - protected static requiresProject = true; public static enableJsonFlag = true; public static examples = [ @@ -71,8 +70,6 @@ export default class Fetch extends SfpowerscriptsCommand { public async execute(): Promise { const fetchStartTime: number = Date.now(); - if (!fs.existsSync('sfdx-project.json')) - throw new Error('This command must be run in the root directory of a SFDX project'); await this.hubOrg.refreshAuth(); const hubConn = this.hubOrg.getConnection();