Skip to content

Commit b33a70e

Browse files
authoredFeb 22, 2017
Merge pull request #20 from n-riesco/patch-1
Add alternative to fs.existsSync
2 parents 60b27de + 6dd16e5 commit b33a70e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎bindings.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ var fs = require('fs')
77
, path = require('path')
88
, join = path.join
99
, dirname = path.dirname
10-
, exists = fs.existsSync || path.existsSync
10+
, exists = ((fs.accessSync && function (path) { try { fs.accessSync(path); } catch (e) { return false; } return true; })
11+
|| fs.existsSync || path.existsSync)
1112
, defaults = {
1213
arrow: process.env.NODE_BINDINGS_ARROW || ' → '
1314
, compiled: process.env.NODE_BINDINGS_COMPILED_DIR || 'compiled'

0 commit comments

Comments
 (0)
Please sign in to comment.