| 20390 | return __awaiter3(this, void 0, void 0, function* () { |
| 20391 | if (!tool) { |
| 20392 | throw new Error("parameter 'tool' is required"); |
| 20393 | } |
| 20394 | if (check) { |
| 20395 | const result = yield which(tool, false); |
| 20396 | if (!result) { |
| 20397 | if (IS_WINDOWS) { |
| 20398 | throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); |
| 20399 | } else { |
| 20400 | throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); |
| 20401 | } |