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

Commit dfb9a52

Browse files
authored
fix: make pid file writing work under Node.js 14.x (#174)
Node.js 14.x expects a string or Buffer, not a plain number, as the `data` argument of `fs.writeFile()`.
1 parent 173c0da commit dfb9a52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ var start = function(opts, done) {
237237
},
238238
function(pid, pidPath, cb) {
239239
debug('Writing pid %d to', pid, pidPath);
240-
fs.writeFile(pidPath, pid, cb);
240+
fs.writeFile(pidPath, String(pid), cb);
241241
}
242242
],
243243
done

0 commit comments

Comments
 (0)