Skip to content

Commit

Permalink
Log error message rather than object
Browse files Browse the repository at this point in the history
  • Loading branch information
Fralleee committed Jun 28, 2023
1 parent 73a7f89 commit 4aa4fbd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/updateManifestVersion.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ if (!customPath) {
process.exit(1)
}

fs.readFile(manifestPath, "utf8", (err, data) => {
if (err) {
console.error(`Error reading file from disk: ${err}`)
fs.readFile(manifestPath, "utf8", (error, data) => {
if (error) {
console.error(`Error reading file from disk: ${error.message}`)
process.exit(1)
}

const manifest = JSON.parse(data)
manifest.version = version

fs.writeFile(manifestPath, JSON.stringify(manifest, null, 2), err => {
if (err) {
console.error(`Error writing file on disk: ${err}`)
fs.writeFile(manifestPath, JSON.stringify(manifest, null, 2), error => {
if (error) {
console.error(`Error writing file on disk: ${error.message}`)
}
})
})

0 comments on commit 4aa4fbd

Please sign in to comment.