Skip to content

Commit

Permalink
fix: write merged setting config
Browse files Browse the repository at this point in the history
  • Loading branch information
Muluk-m authored and cexbrayat committed May 15, 2024
1 parent abbe919 commit c1b8748
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/renderTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ function renderTemplate(src, dest, callbacks) {

if (filename === 'settings.json' && fs.existsSync(dest)) {
// merge instead of overwriting
const settings = JSON.parse(fs.readFileSync(dest, 'utf8'))
const existing = JSON.parse(fs.readFileSync(dest, 'utf8'))
const newSettings = JSON.parse(fs.readFileSync(src, 'utf8'))
const extensions = deepMerge(settings, newSettings)
const settings = deepMerge(existing, newSettings)
fs.writeFileSync(dest, JSON.stringify(settings, null, 2) + '\n')
return
}
Expand Down

0 comments on commit c1b8748

Please sign in to comment.