(tool)
| 20004 | const upperName = path.basename(filePath).toUpperCase(); |
| 20005 | for (const actualName of yield readdir(directory)) { |
| 20006 | if (upperName === actualName.toUpperCase()) { |
| 20007 | filePath = path.join(directory, actualName); |
| 20008 | break; |
| 20009 | } |
| 20010 | } |
| 20011 | } catch (err) { |
| 20012 | console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); |
| 20013 | } |
| 20014 | return filePath; |
| 20015 | } else { |
| 20016 | if (isUnixExecutable(stats)) { |
| 20017 | return filePath; |
| 20018 | } |
| 20019 | } |
| 20020 | } |
| 20021 | } |
| 20022 | return ""; |
| 20023 | }); |
| 20024 | } |
| 20025 | function normalizeSeparators(p) { |
| 20026 | p = p || ""; |
| 20027 | if (IS_WINDOWS) { |
| 20028 | p = p.replace(/\//g, "\\"); |
| 20029 | return p.replace(/\\\\+/g, "\\"); |
| 20030 | } |
| 20031 | return p.replace(/\/\/+/g, "/"); |
| 20032 | } |
| 20033 | function isUnixExecutable(stats) { |
| 20034 | return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); |
| 20035 | } |
| 20036 | |
| 20037 | // |
| 20038 | var __awaiter3 = function(thisArg, _arguments, P, generator) { |
| 20039 | function adopt(value) { |
| 20040 | return value instanceof P ? value : new P(function(resolve2) { |
| 20041 | resolve2(value); |
| 20042 | }); |
| 20043 | } |
| 20044 | return new (P || (P = Promise))(function(resolve2, reject) { |
| 20045 | function fulfilled(value) { |
| 20046 | try { |
| 20047 | step(generator.next(value)); |
| 20048 | } catch (e) { |
| 20049 | reject(e); |
no test coverage detected