{"record":{"id":"7722aac64305799f","repo":"nikivdev/code","slug":"pbcopy-exited-with-status-7722aa","errorCode":null,"errorMessage":"pbcopy exited with status {}","messagePattern":"pbcopy exited with status (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/failure.rs","lineNumber":757,"sourceCode":"fn copy_to_clipboard(text: &str) -> Result<bool> {\n    if std::env::var(\"FLOW_NO_CLIPBOARD\").is_ok() {\n        return Ok(false);\n    }\n\n    #[cfg(target_os = \"macos\")]\n    {\n        let mut child = Command::new(\"pbcopy\")\n            .stdin(Stdio::piped())\n            .spawn()\n            .context(\"failed to spawn pbcopy\")?;\n\n        if let Some(stdin) = child.stdin.as_mut() {\n            stdin.write_all(text.as_bytes())?;\n        }\n\n        let status = child.wait()?;\n        if !status.success() {\n            bail!(\"pbcopy exited with status {}\", status);\n        }\n    }\n\n    #[cfg(target_os = \"linux\")]\n    {\n        let result = Command::new(\"xclip\")\n            .arg(\"-selection\")\n            .arg(\"clipboard\")\n            .stdin(Stdio::piped())\n            .spawn();\n\n        let mut child = match result {\n            Ok(child) => child,\n            Err(_) => Command::new(\"xsel\")\n                .arg(\"--clipboard\")\n                .arg(\"--input\")\n                .stdin(Stdio::piped())\n                .spawn()","sourceCodeStart":739,"sourceCodeEnd":775,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/failure.rs#L739-L775","documentation":"Error \"pbcopy exited with status {}\" thrown in nikivdev/code.","triggerScenarios":"Thrown at src/failure.rs:757 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}