Skip to content

Commit

Permalink
ENG-4883: fixes copy ftl file when platform folder is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
antromeo committed May 29, 2023
1 parent fe87d0a commit 7181638
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/services/bundle-descriptor-converter-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,19 @@ export class BundleDescriptorConverterService {
`Custom widget template FTL found for MFE ${microFrontend.name}, including it`
)

fs.copyFileSync(
customUiFile,
const { dir, base: fileName } = path.parse(
path.resolve(
...DESCRIPTORS_OUTPUT_FOLDER,
WIDGETS_FOLDER,
path.basename(customUiFile)
)
)

if (!fs.existsSync(dir)) {
fs.mkdirSync(dir, { recursive: true })
}

fs.copyFileSync(customUiFile, path.join(dir, fileName))
}

const filePath = path.join(
Expand Down

0 comments on commit 7181638

Please sign in to comment.