earendil-works/pi · error · Error

Custom shell path not found

Error message

Custom shell path not found: ${customShellPath}

What it means

Thrown by getShellConfig when a user-supplied shellPath setting exists as a string but existsSync reports no file at that path. The explicitly configured shell is checked first and must resolve to a real executable.

Solutions

  1. Correct the shellPath value in settings.json to the absolute path of an existing bash binary
  2. Remove shellPath to fall back to automatic shell detection
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/coding-agent/src/utils/shell.ts:73 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of earendil-works/pi@4af9d21d3b (2026-08-24). Data as JSON: /api/errors/b91f1656acc2cc73. Report an issue: GitHub.

Appendix: source

Thrown at packages/coding-agent/src/utils/shell.ts:73

		// Ignore errors
	}
	return null;
}

/**
 * Resolve shell configuration based on platform and an optional explicit shell path.
 * Resolution order:
 * 1. User-specified shellPath
 * 2. On Windows: Git Bash in known locations, then bash on PATH
 * 3. On Unix: /bin/bash, then bash on PATH, then fallback to sh
 */
export function getShellConfig(customShellPath?: string): ShellConfig {
	// 1. Check user-specified shell path
	if (customShellPath) {
		if (existsSync(customShellPath)) {
			return getBashShellConfig(customShellPath);
		}
		throw new Error(`Custom shell path not found: ${customShellPath}`);
	}

	if (process.platform === "win32") {
		// 2. Try Git Bash in known locations
		const paths: string[] = [];
		const programFiles = process.env.ProgramFiles;
		if (programFiles) {
			paths.push(`${programFiles}\\Git\\bin\\bash.exe`);
		}
		const programFilesX86 = process.env["ProgramFiles(x86)"];
		if (programFilesX86) {
			paths.push(`${programFilesX86}\\Git\\bin\\bash.exe`);
		}

		for (const path of paths) {
			if (existsSync(path)) {
				return getBashShellConfig(path);
			}

View on GitHub (pinned to 4af9d21d3b)