( rawPath: string | undefined, envName: string, )
| 231 | } |
| 232 | |
| 233 | export async function resolveExecutableOverridePath( |
| 234 | rawPath: string | undefined, |
| 235 | envName: string, |
| 236 | ): Promise<string | undefined> { |
| 237 | const candidate = normalizeOverridePath(rawPath, envName, 'executable'); |
| 238 | if (!candidate) return undefined; |
| 239 | if (!(await isExecutablePath(candidate))) { |
| 240 | throw new AppError( |
| 241 | 'TOOL_MISSING', |
| 242 | `${envName} points to a missing or non-executable file: ${candidate}`, |
| 243 | { envName, path: candidate }, |
| 244 | ); |
| 245 | } |
| 246 | return candidate; |
| 247 | } |
| 248 | |
| 249 | export async function resolveFileOverridePath( |
| 250 | rawPath: string | undefined, |
no test coverage detected