{"record":{"id":"860b4df33a44e391","repo":"Hmbown/CodeWhale","slug":"app-must-be-web-or-headless-got-app","errorCode":null,"errorMessage":"--app must be `web` or `headless`, got `{app}`","messagePattern":"--app must be `web` or `headless`, got `(.+?)`","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/integrations/cli.rs","lineNumber":400,"sourceCode":"        }\n        DshIntegrationCommand::Disable => {\n            let paths = DshPaths::from_process()?;\n            let record = dsh::set_disabled(&paths, true)?;\n            println!(\n                \"disabled: overlay kept at {}; launches refused\",\n                record.overlay_path.display()\n            );\n            Ok(())\n        }\n        DshIntegrationCommand::Enable => {\n            let paths = DshPaths::from_process()?;\n            let record = dsh::set_disabled(&paths, false)?;\n            println!(\"enabled: {}\", record.overlay_path.display());\n            Ok(())\n        }\n        DshIntegrationCommand::InstallBundle { app, yes } => {\n            let app = dsh::DshAppBundle::parse(&app)\n                .ok_or_else(|| anyhow::anyhow!(\"--app must be `web` or `headless`, got `{app}`\"))?;\n            let (paths, report) = status_report(config, workspace, false)?;\n            ensure_launchable_dsh(&report)?;\n            let record = report.record.as_ref().ok_or_else(|| {\n                anyhow::anyhow!(\"DSH is not connected; run `{CLI_COMMAND} connect` first\")\n            })?;\n            if let dsh::BundleAvailability::NotAvailable { reason } = &report.bundle_availability {\n                anyhow::bail!(\"DSH plugin path not available: {reason}\");\n            }\n            if matches!(report.state, DshIntegrationState::StaleConfig { .. }) {\n                anyhow::bail!(\"overlay is stale; run `{CLI_COMMAND} update` before install-bundle\");\n            }\n            let app_source = dsh::bundle::app_bundle_source(\n                report\n                    .detection\n                    .binary\n                    .as_ref()\n                    .ok_or_else(|| anyhow::anyhow!(\"dsh binary path is unknown\"))?,\n                app,","sourceCodeStart":382,"sourceCodeEnd":418,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/integrations/cli.rs#L382-L418","documentation":"The `dsh install-bundle` command received an --app value that DshAppBundle::parse does not recognize. Only the `web` and `headless` bundle kinds are supported; anything else is rejected before the bundle is installed.","triggerScenarios":"Running `dsh install-bundle --app <value>` with a value other than `web` or `headless` — misspellings, other casing (`Web`), or names copied from other tooling.","commonSituations":"Typos in shell scripts or docs; assuming other app names (e.g. `desktop`, `browser`) are valid; shell scripts with stale flags from an older CLI version.","solutions":["Pass exactly `--app web` or `--app headless` (lowercase).","Check `dsh install-bundle --help` for the accepted values on your CLI version.","Fix the value in any automation scripts invoking this command."],"exampleFix":"// before\ncodewhale dsh install-bundle --app Desktop\n\n// after\ncodewhale dsh install-bundle --app headless","handlingStrategy":"validation","validationCode":"const VALID_APPS: [&str; 2] = [\"web\", \"headless\"];\nif !VALID_APPS.contains(&app.as_str()) {\n    bail!(\"--app must be one of {:?}\", VALID_APPS);\n}","typeGuard":null,"tryCatchPattern":"// Shell\nif [ \"$APP\" != \"web\" ] && [ \"$APP\" != \"headless\" ]; then\n  echo \"--app must be web or headless\" >&2; exit 2;\nfi\ncodewhale dsh install-bundle --app \"$APP\"","preventionTips":["Use --help to enumerate accepted --app values rather than guessing.","Keep install scripts lowercase and in sync with the current CLI.","Test automation flags against the installed CLI version after upgrades."],"tags":["cli","argument","dsh"],"backgroundTag":"invalid-cli-argument","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}