From 4ef124df29c81bcad5dcfea5266d553a9f0550f7 Mon Sep 17 00:00:00 2001 From: azlam Date: Mon, 17 Jul 2023 12:54:41 +1000 Subject: [PATCH] fix(validate): remove trailing braces of an escaped string --- .../src/commands/orchestrator/validateAgainstOrg.ts | 2 +- .../sfpowerscripts-cli/src/impl/validate/ValidateImpl.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/sfpowerscripts-cli/src/commands/orchestrator/validateAgainstOrg.ts b/packages/sfpowerscripts-cli/src/commands/orchestrator/validateAgainstOrg.ts index abf2f102d..0abdebded 100644 --- a/packages/sfpowerscripts-cli/src/commands/orchestrator/validateAgainstOrg.ts +++ b/packages/sfpowerscripts-cli/src/commands/orchestrator/validateAgainstOrg.ts @@ -162,7 +162,7 @@ export default class ValidateAgainstOrg extends SfpowerscriptsCommand { } catch (error) { if (error instanceof ValidateError) { validateResult = error.data; - } else SFPLogger.log(error.message); + } SFPStatsSender.logCount('validate.failed', tags); diff --git a/packages/sfpowerscripts-cli/src/impl/validate/ValidateImpl.ts b/packages/sfpowerscripts-cli/src/impl/validate/ValidateImpl.ts index a1051ded1..d8db5cf1e 100644 --- a/packages/sfpowerscripts-cli/src/impl/validate/ValidateImpl.ts +++ b/packages/sfpowerscripts-cli/src/impl/validate/ValidateImpl.ts @@ -192,8 +192,8 @@ export default class ValidateImpl implements PostDeployHook, PreDeployHook { ); return; } else if (error instanceof ValidateError) - SFPLogger.log(`Error: ${error}`, LoggerLevel.DEBUG); - else SFPLogger.log(`Error: ${error}}`, LoggerLevel.ERROR); + SFPLogger.log(`Validation failed due to : ${error}`, LoggerLevel.DEBUG); + else SFPLogger.log(`Failure Reason: ${error}`, LoggerLevel.ERROR); throw error; } finally { await this.handleScratchOrgStatus( @@ -458,7 +458,7 @@ export default class ValidateImpl implements PostDeployHook, PreDeployHook { const { generatedPackages, failedPackages } = await buildImpl.exec(); if (failedPackages.length > 0) - throw new Error(`Failed to create source packages ${failedPackages}`); + throw new Error(`Failed to create source1 packages ${failedPackages}`); if (generatedPackages.length === 0) { throw new Error(