From 55d67663c1c5ce752812d6cae81666e32e08016b Mon Sep 17 00:00:00 2001 From: azlam Date: Tue, 22 Aug 2023 13:21:08 +1000 Subject: [PATCH] fix(deploy): create file before writing --- packages/sfpowerscripts-cli/src/outputs/FileOutputHandler.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/sfpowerscripts-cli/src/outputs/FileOutputHandler.ts b/packages/sfpowerscripts-cli/src/outputs/FileOutputHandler.ts index 019fecdd0..c44f9ad58 100644 --- a/packages/sfpowerscripts-cli/src/outputs/FileOutputHandler.ts +++ b/packages/sfpowerscripts-cli/src/outputs/FileOutputHandler.ts @@ -17,6 +17,9 @@ export default class FileOutputHandler { } public writeOutput(fileName: string, output: string ) { + if (!fs.existsSync(path.join(this.containerFolder, fileName))) { + fs.createFileSync(path.join(this.containerFolder, fileName)); + } fs.writeFileSync(path.join(this.containerFolder, fileName), output); };