Skip to content

Commit 9e85c59

Browse files
authored
Fix argument type of fs.writeFileSync (#1075)
It causes error in Node version 14+. A number type is not valid for the second argument of fs.writeFileSync from the documentation. https://nodejs.org/docs/latest-v14.x/api/fs.html#fs_fs_writefilesync_file_data_options
1 parent 58eb131 commit 9e85c59

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/monitor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ var fs = require('fs'),
1010
// Write the pidFile to disk for later use
1111
//
1212
function writePid(file, pid) {
13-
fs.writeFileSync(file, pid, 'utf8');
13+
fs.writeFileSync(file, String(pid), 'utf8');
1414
}
1515

1616
//
@@ -84,4 +84,4 @@ process.on('message', function (data) {
8484
started = true;
8585
start(options);
8686
}
87-
});
87+
});

0 commit comments

Comments
 (0)