Skip to content

Commit 69c70ed

Browse files
committed
Remove ENOTDIR from the if condition in the context of readFileSync
Signed-off-by: Shylesh Kumar Mohan <shmohan@redhat.com>
1 parent e6ad7c8 commit 69c70ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/util/fs_utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ function try_read_file_sync(file_name) {
142142
try {
143143
return fs.readFileSync(file_name, 'utf8');
144144
} catch (err) {
145-
if (err.code === 'ENOENT' || err.code === 'ENOTDIR') {
146-
// file does not exist or is not a directory
145+
if (err.code === 'ENOENT') {
146+
// file does not exist
147147
return;
148148
}
149149
throw err;

0 commit comments

Comments
 (0)