(filePath: string)
| 674 | } |
| 675 | |
| 676 | export async function isExecutablePath(filePath: string): Promise<boolean> { |
| 677 | try { |
| 678 | if (!(await isFilePath(filePath))) return false; |
| 679 | await access(filePath, process.platform === 'win32' ? constants.F_OK : constants.X_OK); |
| 680 | return true; |
| 681 | } catch { |
| 682 | return false; |
| 683 | } |
| 684 | } |
| 685 | |
| 686 | async function isFilePath(filePath: string): Promise<boolean> { |
| 687 | try { |
no test coverage detected