fixed ykman path on macos

This commit is contained in:
antelle 2020-06-05 16:41:38 +02:00
parent 7e4e61e005
commit 4abe63c00f
No known key found for this signature in database
GPG Key ID: 63C9777AAB7C563C
1 changed files with 6 additions and 1 deletions

View File

@ -84,7 +84,12 @@ const Launcher = {
});
},
fileExists(path, callback) {
this.req('fs').exists(path, callback);
const fs = this.req('fs');
fs.access(path, fs.constants.F_OK, (err) => callback(!err));
},
fileExistsSync(path) {
const fs = this.req('fs');
return !fs.accessSync(path, fs.constants.F_OK);
},
deleteFile(path, callback) {
this.req('fs').unlink(path, callback || noop);