{"record":{"id":"622a2bd299525423","repo":"Morganamilo/paru","slug":"1-status","errorCode":"1","errorMessage":"Status: {}","messagePattern":"Status: (.+?)","errorType":"error_code","errorClass":"Status","httpStatus":null,"severity":"warning","filePath":"src/install.rs","lineNumber":51,"sourceCode":"use aur_depends::{Actions, Base, Conflict, DepMissing, RepoPackage};\nuse log::debug;\nuse raur::Cache;\nuse srcinfo::{ArchVecs, Srcinfo};\nuse tr::tr;\n\n#[derive(Copy, Clone, Debug)]\npub struct Status(pub i32);\n\nimpl std::fmt::Display for Status {\n    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n        write!(f, \"Status: {}\", self.0)\n    }\n}\n\nimpl std::error::Error for Status {}\n\nimpl Status {\n    pub fn err(n: i32) -> Result<()> {\n        bail!(Status(n))\n    }\n}\n\nstruct Installer {\n    refresh: usize,\n    sysupgrade: usize,\n    install_targets: bool,\n    done_something: bool,\n    ran_pacman: bool,\n    upgrades: Upgrades,\n    srcinfos: HashMap<String, Srcinfo>,\n    remove_make: Vec<String>,\n    conflicts: HashSet<String>,\n    failed: Vec<Base>,\n    chroot: Chroot,\n    deps: Vec<String>,\n    exp: Vec<String>,","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/Morganamilo/paru/blob/9ac3578807a87858651e81a02586ceb947686e7c/src/install.rs#L33-L69","documentation":"Status is paru's top-level exit-code error type; Status::err(n) wraps an integer exit code in a Result::Err whose Display renders 'Status: {}'. This is the canonical constructor: any code path that needs to abort paru with a specific nonzero exit code flows through here. It is not a crash — paru exits with that code after printing the message.","triggerScenarios":"Any internal code path calling Status::err(code) — e.g. after pacman subprocess failures, user declining prompts, or build failures — bubbling up to main and terminating the process with that exit status.","commonSituations":"Pacman returning nonzero during a transaction; user answering 'no' to a proceed prompt; scripts wrapping paru and inspecting its exit code.","solutions":["Read the exit code and surrounding output to identify the underlying failed step (pacman, review prompt, build).","Re-run and accept the interactive prompt if you declined it.","Fix the underlying pacman error (conflicts, missing repo, locked db) before retrying."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"run paru; capture exit code; treat nonzero as the failing step's status and inspect stderr for the root cause","preventionTips":["Read the output above the Status line — it names the real failure","Map exit codes to steps (pacman failure vs declined prompt)","Use --noconfirm in scripts to avoid prompt-driven aborts"],"tags":["exit-code","control-flow","pacman"],"backgroundTag":"process-exit-code","analyzedSha":"9ac3578807a87858651e81a02586ceb947686e7c","analyzedAt":"2026-09-12T04:57:59.861Z","contentChangedAt":"2026-09-12T04:57:59.861Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}