diff --git a/src/commands/project/deploy/start.ts b/src/commands/project/deploy/start.ts index e0133378c..5bbcbb4de 100644 --- a/src/commands/project/deploy/start.ts +++ b/src/commands/project/deploy/start.ts @@ -279,6 +279,7 @@ export default class DeployMetadata extends SfCommand { const result = await deploy.pollStatus({ timeout: flags.wait }); process.exitCode = determineExitCode(result); + this.stages.stop(); const formatter = new DeployResultFormatter(result, flags); if (!this.jsonEnabled()) { @@ -292,10 +293,11 @@ export default class DeployMetadata extends SfCommand { } protected catch(error: Error | SfError): Promise { + this.stages?.update({ status: 'Failed' }); + this.stages?.error(); + if (error instanceof SourceConflictError && error.data) { if (!this.jsonEnabled()) { - this.stages?.update({ status: 'Failed' }); - this.stages?.error(); writeConflictTable(error.data); // set the message and add plugin-specific actions return super.catch({