diff --git a/packages/cli/src/commands/org/config/pull.ts b/packages/cli/src/commands/org/config/pull.ts index 0e00f80341..7c57f653b2 100644 --- a/packages/cli/src/commands/org/config/pull.ts +++ b/packages/cli/src/commands/org/config/pull.ts @@ -51,7 +51,6 @@ export default class Pull extends Command { @Preconditions(IsAuthenticated()) public async run() { - cli.action.start('Creating Snapshot'); const snapshot = await this.getSnapshot(); cli.action.start('Updating project with Snapshot'); @@ -96,11 +95,13 @@ export default class Pull extends Command { const {flags} = this.parse(Pull); const target = await getTargetOrg(this.configuration, flags.target); if (flags.snapshotId) { + cli.action.start('Retrieving Snapshot'); return SnapshotFactory.createFromExistingSnapshot( flags.snapshotId, target ); } + cli.action.start('Creating Snapshot'); return SnapshotFactory.createFromOrg( this.ResourceSnapshotTypesToExport, target diff --git a/packages/cli/src/lib/snapshot/snapshotFactory.ts b/packages/cli/src/lib/snapshot/snapshotFactory.ts index d5e5191c5a..4d5df9c2fa 100644 --- a/packages/cli/src/lib/snapshot/snapshotFactory.ts +++ b/packages/cli/src/lib/snapshot/snapshotFactory.ts @@ -42,7 +42,11 @@ export class SnapshotFactory { const model = await client.resourceSnapshot.get(snapshotId, { includeReports: true, }); - return new Snapshot(model, client); + + const snapshot = new Snapshot(model, client); + await snapshot.waitUntilDone(); + + return snapshot; } public static async createFromOrg(