{"record":{"id":"e209e278e702a286","repo":"vectordotdev/vector","slug":"app","errorCode":null,"errorMessage":"{}","messagePattern":"\\{\\}","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"vdev/src/app.rs","lineNumber":118,"sourceCode":"        }\n    }\n\n    /// Set the command's working directory to the repository directory.\n    fn in_repo(&mut self) -> &mut Self {\n        self.current_dir(path())\n    }\n\n    /// Run the command and capture its output.\n    fn check_output(&mut self) -> Result<String> {\n        self.pre_exec();\n\n        let output = self.output()?;\n\n        if output.status.success() {\n            // If the command exits successfully, return stdout as a string\n            Ok(String::from_utf8(output.stdout)?)\n        } else {\n            bail!(\n                \"{}\",\n                format_command_error(&output, Some(&format!(\"Command: {self:?}\")))\n            )\n        }\n    }\n\n    /// Run the command and catch its exit code.\n    fn run(&mut self) -> Result<ExitStatus> {\n        self.pre_exec();\n        self.status().map_err(Into::into)\n    }\n\n    fn check_run(&mut self) -> Result<()> {\n        let status = self.run()?;\n        if status.success() {\n            Ok(())\n        } else {\n            let exit = status.code().unwrap();","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/vectordotdev/vector/blob/bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013/vdev/src/app.rs#L100-L136","documentation":"vdev's check_output runs a command capturing stdout and expects a zero exit status, returning stdout as a String. When the command exits non-zero, it bails with the formatted command error (including a \"Command: {self:?}\" dump of the invocation). The message body is generic ({}), so the actual failure detail comes from format_command_error.","triggerScenarios":"Any vdev code path calling exec()/check_output on an external command (cargo, git, docker, etc.) that exits with a non-zero status; also reachable from retains_state_between_requests when an underlying invocation fails.","commonSituations":"Missing tools on PATH during vdev runs (e.g. cargo feature not installed); docker/podman not running for integration tasks; git operations failing in CI; disk/permission errors in build scripts invoked by vdev.","solutions":["Read the formatted error output (it echoes \"Command: ...\") and run that command manually to see the raw failure.","Install or fix the missing/failing tool (ensure cargo, git, docker/podman are on PATH and functional).","Re-run with a clean environment / correct working directory, since vdev commands are directory-sensitive.","If the command is expected to fail sometimes, switch the call site to non-checking output() handling instead of exec()."],"exampleFix":"// before: vdev exec(\"cargo metadata ...\") fails because toolchain missing\nrustup update stable && cargo --version\n// after: rerun the vdev command once the tool answers on PATH","handlingStrategy":"try-catch","validationCode":"# Pre-flight check for tools vdev will invoke\ncargo --version >/dev/null 2>&1 || { echo \"cargo missing\"; exit 1; }\ngit --version >/dev/null 2>&1 || { echo \"git missing\"; exit 1; }","typeGuard":null,"tryCatchPattern":"// Catch vdev command failures and re-run the underlying command for detail\nmatch vdev_exec(cmd) {\n  Err(e) => {\n    eprintln!(\"vdev exec failed: {e}; re-running command verbosely\");\n    run_verbose(cmd)?;\n  }\n  ok => ok?,\n}","preventionTips":["Install all tools vdev wraps (cargo, rustup, git, docker/podman) in the execution environment.","Run vdev from the repository root so relative command contexts resolve.","Read the echoed \"Command: ...\" in the error and reproduce it manually for the real stderr.","Keep CI images aligned with docs/DEVELOPING.md tool requirements."],"tags":["cli","process","command-execution","vdev"],"backgroundTag":"command-execution-failed","analyzedSha":"bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013","analyzedAt":"2026-09-16T02:53:35.741Z","contentChangedAt":"2026-09-16T02:53:35.741Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}