{"record":{"id":"0e54f9e44597b261","repo":"pbakaus/impeccable","slug":"unknown-update-scope-v-use-project-or-user","errorCode":null,"errorMessage":"Unknown update scope: {v}. Use --project or --user.","messagePattern":"Unknown update scope: (.+?)\\. Use --project or --user\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/skills/src/commands.rs","lineNumber":741,"sourceCode":"        out(io, &format!(\"Installed hooks into: {}\", hook_targets.join(\", \")));\n    }\n    out(io, \"\\nDone! Now type /impeccable init in your AI coding agent's chat (not in this terminal) to set up design context.\\n\");\n    Ok(())\n}\n\n// ─── update ──────────────────────────────────────────────────────────────────\n\n/// JS: update(flags)\nfn update(flags: &[String], io: &mut Io) -> R<()> {\n    let (sys, mut prompt) = ctx(io);\n    let yes = has_flag(flags, \"-y\") || has_flag(flags, \"--yes\");\n    let force = has_flag(flags, \"--force\");\n    let install_hooks = !has_flag(flags, \"--no-hooks\");\n    let scope_value = get_install_scope_value(flags);\n    let explicit_scope = scope_value.as_deref().and_then(normalize_install_scope);\n    if let Some(v) = &scope_value {\n        if explicit_scope.is_none() {\n            err(io, &format!(\"Unknown update scope: {v}. Use --project or --user.\"));\n            return Err(Flow::Exit(1));\n        }\n    }\n\n    let project_root = sys.find_project_root();\n    let home = sys.home.clone();\n\n    let target = sys.resolve_update_target(&project_root, explicit_scope);\n    let Some(target) = target else {\n        match explicit_scope {\n            Some(scope) => {\n                let where_ = if scope == Scope::User {\n                    format!(\"user level ({})\", sys.format_path_for_display(&home))\n                } else {\n                    format!(\"this project ({project_root})\")\n                };\n                out(io, &format!(\"No impeccable skill folders found at the {where_}.\"));\n            }","sourceCodeStart":723,"sourceCodeEnd":759,"githubUrl":"https://github.com/pbakaus/impeccable/blob/2bc2879276c1f321a53c4ca99d3371e411329b52/crates/skills/src/commands.rs#L723-L759","documentation":"During `update`, the --user/--project scope value is normalized via normalize_install_scope. If the provided scope string is not recognized, update exits 1 with 'Unknown update scope: {v}. Use --project or --user.' Only --project and --user are valid scope values.","triggerScenarios":"Running `impeccable update` with a scope flag whose value does not normalize to project/user, e.g. `--scope=global`, `--scope=local`, or a malformed `--project=yes` style value caught by get_install_scope_value.","commonSituations":"Users guessing at scope names ('global', 'local', 'repo'); copying flags from the install command where a different form is accepted; shell scripts with templated scope values.","solutions":["Use exactly `--project` or `--user` for the scope.","Omit the scope flag entirely to use the auto-detected default scope.","Fix the shell script/alias that interpolates an invalid scope value."],"exampleFix":"// before\nimpeccable update --scope=global\n// after\nimpeccable update --user","handlingStrategy":"validation","validationCode":"SCOPE=\"--user\"   # only --project or --user are valid\nimpeccable update \"$SCOPE\"","typeGuard":null,"tryCatchPattern":"case \"$SCOPE\" in --project|--user) impeccable update \"$SCOPE\";; *) echo \"invalid scope\";; esac","preventionTips":["Only ever pass --project or --user to update.","Sanitize interpolated scope values in shell scripts.","Omit the scope flag to rely on auto-detection when unsure."],"tags":["cli","flag","scope","invalid-value"],"backgroundTag":"invalid-flag-value","analyzedSha":"2bc2879276c1f321a53c4ca99d3371e411329b52","analyzedAt":"2026-09-08T04:51:14.109Z","contentChangedAt":"2026-09-08T04:51:14.109Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}