{"record":{"id":"166c334e90618c07","repo":"zed-industries/zed","slug":"markdown-requires-o","errorCode":null,"errorMessage":"--markdown requires -o","messagePattern":"--markdown requires -o","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/edit_prediction_cli/src/main.rs","lineNumber":1249,"sourceCode":"                    Command::Eval(args) => {\n                        if !args.context_only {\n                            predict::sync_batches(args.predict.provider.as_ref()).await?;\n                        }\n                    }\n                    Command::Qa(args) => {\n                        qa::sync_batches(args).await?;\n                    }\n                    Command::Repair(args) => {\n                        repair::sync_batches(args).await?;\n                    }\n                    _ => (),\n                }\n\n                let failfast_on_single_example = examples.len() == 1;\n\n                // For --markdown mode, create the output directory if it doesn't exist\n                if args.markdown {\n                    let dir = output.as_ref().expect(\"--markdown requires -o\");\n                    if !dir.exists() {\n                        std::fs::create_dir_all(dir)\n                            .expect(\"Failed to create markdown output directory\");\n                    }\n                }\n\n                // Set up JSONL output writer (not used in markdown mode)\n                let mut output_sender: Option<mpsc::UnboundedSender<String>> = None;\n                let mut in_place_temp_path: Option<PathBuf> = None;\n                if !args.markdown\n                    && let Some(output_path) = output.as_ref()\n                {\n                    let write_path = if args.in_place {\n                        let temp = output_path.with_extension(\"jsonl.tmp\");\n                        in_place_temp_path = Some(temp.clone());\n                        temp\n                    } else {\n                        output_path.clone()","sourceCodeStart":1231,"sourceCodeEnd":1267,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/edit_prediction_cli/src/main.rs#L1231-L1267","documentation":"Panics in the CLI's markdown output mode when `--markdown` was passed without `-o` specifying an output directory; markdown files cannot be written without a destination. It is an argument-validation guard (see also the earlier eprintln+exit for the same condition).","triggerScenarios":"Thrown at crates/edit_prediction_cli/src/main.rs:1249 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass `-o <dir>` together with `--markdown`","Check the invocation script for a missing output flag"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}