{"record":{"id":"103812cd4f507cdb","repo":"gitbutlerapp/gitbutler","slug":"unknown-terminal-terminal-id","errorCode":null,"errorMessage":"Unknown terminal: {terminal_id}","messagePattern":"Unknown terminal: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/but-api/src/open/mod.rs","lineNumber":472,"sourceCode":"                    .arg(\"--args\")\n                    .arg(\"--working-directory\")\n                    .arg(&path);\n                run_terminal_command(cmd, \"Alacritty\", &path)?;\n            }\n            \"kitty\" => open_with_path(\"kitty\", Some(\"Kitty\"))?,\n            // WezTerm does not support `open -a WezTerm <path>`. Their docs state you have to use their CLI.\n            // https://wezterm.org/config/launch.html#specifying-the-current-working-directory\n            \"wezterm-mac\" => {\n                let cli_found = which::which(\"wezterm\").is_ok();\n                if !cli_found {\n                    return Err(anyhow::anyhow!(\"'wezterm' CLI was not found on PATH.\")\n                        .context(but_error::Code::DefaultTerminalNotFound));\n                }\n                let mut cmd = Command::new(\"wezterm\");\n                cmd.arg(\"start\").arg(\"--cwd\").arg(&path);\n                run_terminal_command(cmd, \"WezTerm\", &path)?;\n            }\n            _ => bail!(\"Unknown terminal: {terminal_id}\"),\n        };\n    } else if cfg!(target_os = \"linux\") {\n        let binary = terminal::terminal_binary(&terminal_id);\n\n        // Check if the terminal binary exists in PATH before attempting to launch.\n        // This lets us give a clear error directing users to Settings, rather than\n        // a vague launch failure (which could be confused with path issues).\n        let binary_found = which::which(binary).is_ok();\n        if !binary_found {\n            return Err(anyhow::anyhow!(\n                \"'{binary}' was not found. Make sure it is installed and available on your PATH.\"\n            )\n            .context(but_error::Code::DefaultTerminalNotFound));\n        }\n\n        match terminal_id.as_str() {\n            // Terminals that inherit parent process CWD (no explicit flags needed).\n            // Note: `binary` is used instead of the terminal ID because some terminals","sourceCodeStart":454,"sourceCodeEnd":490,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/58e5313667b857ef39a730e380af31816a7b1768/crates/but-api/src/open/mod.rs#L454-L490","documentation":"On macOS, open_in_terminal() matches terminal_id against a known list of terminals; the fall-through arm bails with 'Unknown terminal' for any unrecognized identifier. The terminal id comes from caller settings and must be one the library knows how to launch.","triggerScenarios":"Calling open_in_terminal on macOS with a terminal_id string not in the macOS match list (typo, custom id, or a terminal supported only on Linux/Windows).","commonSituations":"Settings synced across platforms carrying a Linux-only terminal id to macOS, user-edited settings with a misspelled terminal name, or a newly added terminal not yet in this build.","solutions":["Use a supported terminal id for macOS (e.g. iterm, terminal, warp, alacritty, kitty, wezterm, hyper)","Check Settings and pick a terminal from the supported list","Upgrade to a build that supports the desired terminal"],"exampleFix":"// before\nopen_in_terminal(\"konsole\", path) // on macOS\n// after\nopen_in_terminal(\"iterm\", path)","handlingStrategy":"validation","validationCode":"const MACOS_TERMINALS: [&str; 7] = [\"terminal\",\"iterm\",\"warp\",\"alacritty\",\"kitty\",\"wezterm\",\"hyper\"];\nfn is_known_macos_terminal(id: &str) -> bool { MACOS_TERMINALS.contains(&id) }","typeGuard":"fn is_supported_terminal(id: &str) -> bool { MACOS_TERMINALS.contains(&id) }","tryCatchPattern":null,"preventionTips":["Pick terminal ids from the Settings list rather than free text","Guard settings sync so platform-specific ids don't cross OSes","Keep a single source of truth for supported terminal ids per platform"],"tags":["terminal","macos","unknown-identifier"],"backgroundTag":"invalid-enum-value","analyzedSha":"58e5313667b857ef39a730e380af31816a7b1768","analyzedAt":"2026-09-18T06:50:32.052Z","contentChangedAt":"2026-09-18T06:50:32.052Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}