diff --git a/packages/sfpowerscripts-cli/src/impl/deploy/DeployImpl.ts b/packages/sfpowerscripts-cli/src/impl/deploy/DeployImpl.ts index 0202ba38d..f7c734d7d 100644 --- a/packages/sfpowerscripts-cli/src/impl/deploy/DeployImpl.ts +++ b/packages/sfpowerscripts-cli/src/impl/deploy/DeployImpl.ts @@ -232,6 +232,13 @@ export default class DeployImpl { result: PackageInstallationStatus.Failed, message: error, }; + + + FileOutputHandler.getInstance().writeOutput(`deployment-error.md`,`### 💣 Deployment Failed 💣`); + FileOutputHandler.getInstance().appendOutput(`deployment-error.md`,`Package Installation failed for **${queue[i].packageName}**`); + FileOutputHandler.getInstance().appendOutput(`deployment-error.md`,`Reasons:`); + FileOutputHandler.getInstance().appendOutput(`deployment-error.md`,`${error}`); + return failedPackageInstallationResult; } } diff --git a/packages/sfpowerscripts-cli/src/outputs/FileOutputHandler.ts b/packages/sfpowerscripts-cli/src/outputs/FileOutputHandler.ts index c44f9ad58..cba026c60 100644 --- a/packages/sfpowerscripts-cli/src/outputs/FileOutputHandler.ts +++ b/packages/sfpowerscripts-cli/src/outputs/FileOutputHandler.ts @@ -1,4 +1,5 @@ import * as fs from 'fs-extra'; +import { EOL } from 'os'; import path from 'path'; export default class FileOutputHandler { @@ -27,6 +28,7 @@ export default class FileOutputHandler { if (!fs.existsSync(path.join(this.containerFolder, fileName))) { fs.createFileSync(path.join(this.containerFolder, fileName)); } + fs.appendFileSync(path.join(this.containerFolder, fileName), EOL); fs.appendFileSync(path.join(this.containerFolder, fileName), output); }