{"record":{"id":"26848d2eba362636","repo":"gitbutlerapp/gitbutler","slug":"human-input-required-run-this-in-a-terminal-or","errorCode":null,"errorMessage":"Human input required - run this in a terminal, or specify --path/--detect to avoid interactive prompts.","messagePattern":"Human input required - run this in a terminal, or specify --path/--detect to avoid interactive prompts\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/but/src/command/skill/mod.rs","lineNumber":1033,"sourceCode":"        None => Err(UserCancelled.into()),\n    }\n}\n\n/// Prompt user to select installation scope and format\nfn prompt_for_install_path(\n    ctx: Option<&mut Context>,\n    global: bool,\n    out: &mut OutputChannel,\n    progress: &mut impl std::io::Write,\n) -> Result<PathBuf> {\n    let t = theme::get();\n    if out.for_human().is_none() {\n        anyhow::bail!(\n            \"No supported agent was detected. In non-interactive mode, specify --path or --detect. Use --path <path> to choose an installation directory, or --detect to update an existing installation.\"\n        );\n    }\n    if !out.can_prompt() {\n        anyhow::bail!(\n            \"Human input required - run this in a terminal, or specify --path/--detect to avoid interactive prompts.\"\n        );\n    }\n\n    let local_scope_available = if !global {\n        match ctx.as_ref() {\n            Some(ctx) => {\n                let repo = ctx.repo.get()?;\n                repo.workdir().is_some()\n            }\n            None => false,\n        }\n    } else {\n        false\n    };\n\n    let mut input = out\n        .prepare_for_terminal_input()","sourceCodeStart":1015,"sourceCodeEnd":1051,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/58e5313667b857ef39a730e380af31816a7b1768/crates/but/src/command/skill/mod.rs#L1015-L1051","documentation":"`prompt_for_install_path` needs to interactively ask the user where to install skills. When stdout is not a promptable terminal (`out.can_prompt()` is false), it bails because human input is required, suggesting non-interactive flags instead.","triggerScenarios":"Running `but skill install` (human output but not promptable, e.g. output piped, stdin closed, or `yes | but skill install`) when `--path`/`--detect` were not provided and prompting would otherwise be needed.","commonSituations":"Piping CLI output (`but skill install | tee log`); running under CI with no TTY; wrapping the command in scripts that capture stdout.","solutions":["Pass `--path <dir>` so no prompt is needed.","Pass `--detect` to reuse an existing installation without prompting.","Run the command directly in an interactive terminal."],"exampleFix":"// before\nbut skill install | tee install.log\n// error: Human input required...\n\n// after\nbut skill install --path ~/.claude/skills/gitbutler | tee install.log","handlingStrategy":"validation","validationCode":"# only run prompted install when a TTY is available\nif [ -t 0 ] && [ -t 1 ]; then but skill install; else but skill install --path ~/.claude/skills/gitbutler; fi","typeGuard":null,"tryCatchPattern":"but skill install --path \"$DIR\" || echo \"install failed; run in a terminal or pass --path/--detect\"","preventionTips":["Avoid piping `but skill install` output; it disables prompting.","Check `[ -t 0 ]` before relying on interactive prompts.","Prefer --path in any scripted context."],"tags":["cli","interactive","tty"],"backgroundTag":"missing-required-flag","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"}