Skip to content

Commit 9f581a5

Browse files
refactor: use fs.constants.F_OK for file access checks
1 parent 8c673e7 commit 9f581a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

node_helper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ module.exports = NodeHelper.create({
103103
const configPath = this.getConfigPath();
104104
this.thisConfig = {};
105105
try {
106-
fs.accessSync(configPath, fs.F_OK);
106+
fs.accessSync(configPath, fs.constants.F_OK);
107107
const c = require(configPath);
108108
const config = {...defaults, ...c};
109109
this.configOnHd = config;
@@ -325,7 +325,7 @@ module.exports = NodeHelper.create({
325325
const filename = path.resolve(`${modulePath}/${module.longname}.js`);
326326

327327
try {
328-
fs.accessSync(filename, fs.F_OK);
328+
fs.accessSync(filename, fs.constants.F_OK);
329329

330330
/* Defaults are stored when Module.register is called during require(filename); */
331331
require(filename);

0 commit comments

Comments
 (0)