Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Commit

Permalink
fix: make pid file writing work under Node.js 14.x (#174)
Browse files Browse the repository at this point in the history
Node.js 14.x expects a string or Buffer, not a plain number, as the
`data` argument of `fs.writeFile()`.
  • Loading branch information
addaleax authored Oct 22, 2020
1 parent 173c0da commit dfb9a52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ var start = function(opts, done) {
},
function(pid, pidPath, cb) {
debug('Writing pid %d to', pid, pidPath);
fs.writeFile(pidPath, pid, cb);
fs.writeFile(pidPath, String(pid), cb);
}
],
done
Expand Down

0 comments on commit dfb9a52

Please sign in to comment.