Skip to content

Commit

Permalink
fixup! Fix create-release-archive script on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
lfdebrux committed Jun 16, 2022
1 parent d8026ae commit 3ed4543
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/create-release-archive.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ function updatePackageJson (file, updater) {
let pkg
pkg = JSON.parse(fs.readFileSync(file, { encoding: 'utf8' }))
pkg = updater(pkg)
fs.writeFileSync(file, JSON.stringify(pkg, null, 2) + os.EOL, { encoding: 'utf8' })
const formattedJson = JSON.stringify(pkg, null, 2).replace(/\n/g, os.EOL) + os.EOL
fs.writeFileSync(file, formattedJson, { encoding: 'utf8' })
// update package-lock.json to match
child_process.execSync('npm install', { cwd: path.dirname(file), encoding: 'utf8', stdio: 'inherit' })
}
Expand Down

0 comments on commit 3ed4543

Please sign in to comment.