Skip to content

Commit 87c774a

Browse files
committed
accessSync issue node 0.10
1 parent 9376c4f commit 87c774a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lib/LocalBinary.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,15 @@ function LocalBinary(){
5353
fs.accessSync(path, mode);
5454
return true;
5555
} catch(e){
56-
return false;
56+
if(typeof fs.accessSync !== 'undefined') return false;
57+
58+
// node v0.10
59+
try {
60+
fs.statSync(path);
61+
return true;
62+
} catch (e){
63+
return false;
64+
}
5765
}
5866
};
5967

0 commit comments

Comments
 (0)