zed-industries/zed · error
--markdown requires -o
Error message
--markdown requires -o
What it means
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).
Source
Thrown at crates/edit_prediction_cli/src/main.rs:1249
Command::Eval(args) => {
if !args.context_only {
predict::sync_batches(args.predict.provider.as_ref()).await?;
}
}
Command::Qa(args) => {
qa::sync_batches(args).await?;
}
Command::Repair(args) => {
repair::sync_batches(args).await?;
}
_ => (),
}
let failfast_on_single_example = examples.len() == 1;
// For --markdown mode, create the output directory if it doesn't exist
if args.markdown {
let dir = output.as_ref().expect("--markdown requires -o");
if !dir.exists() {
std::fs::create_dir_all(dir)
.expect("Failed to create markdown output directory");
}
}
// Set up JSONL output writer (not used in markdown mode)
let mut output_sender: Option<mpsc::UnboundedSender<String>> = None;
let mut in_place_temp_path: Option<PathBuf> = None;
if !args.markdown
&& let Some(output_path) = output.as_ref()
{
let write_path = if args.in_place {
let temp = output_path.with_extension("jsonl.tmp");
in_place_temp_path = Some(temp.clone());
temp
} else {
output_path.clone()View on GitHub (pinned to f4178619ac)
Solutions
- Pass `-o <dir>` together with `--markdown`
- Check the invocation script for a missing output flag
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/edit_prediction_cli/src/main.rs:1249 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/166c334e90618c07.
Report an issue: GitHub.