( rawPath: string | undefined, envName: string, )
| 247 | } |
| 248 | |
| 249 | export async function resolveFileOverridePath( |
| 250 | rawPath: string | undefined, |
| 251 | envName: string, |
| 252 | ): Promise<string | undefined> { |
| 253 | const candidate = normalizeOverridePath(rawPath, envName, 'file'); |
| 254 | if (!candidate) return undefined; |
| 255 | if (!(await isFilePath(candidate))) { |
| 256 | throw new AppError( |
| 257 | 'TOOL_MISSING', |
| 258 | `${envName} points to a missing or non-file path: ${candidate}`, |
| 259 | { envName, path: candidate }, |
| 260 | ); |
| 261 | } |
| 262 | return candidate; |
| 263 | } |
| 264 | |
| 265 | export function runCmdSync(cmd: string, args: string[], options: ExecOptions = {}): ExecResult { |
| 266 | const executable = normalizeExecutableCommand(cmd); |
no test coverage detected