Skip to content

Commit 3b58104

Browse files
committedJun 29, 2023
feat: always use polling on IBM i
IBM i does not support fs.watch https://nodejs.org/api/fs.html#caveats Therefore we always want to use polling on IBM i systems
1 parent 6787871 commit 3b58104

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed
 

‎lib/monitor/watch.js

+4
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ function watch() {
6969
watchOptions.disableGlobbing = true;
7070
}
7171

72+
if (utils.isIBMi) {
73+
watchOptions.usePolling = true;
74+
}
75+
7276
if (process.env.TEST) {
7377
watchOptions.useFsEvents = false;
7478
}

‎lib/utils/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ var utils = (module.exports = {
1717
isWindows: process.platform === 'win32',
1818
isMac: process.platform === 'darwin',
1919
isLinux: process.platform === 'linux',
20+
isIBMi: require('os').type() === 'OS400',
2021
isRequired: (function () {
2122
var p = module.parent;
2223
while (p) {

0 commit comments

Comments
 (0)
Please sign in to comment.