jdx/mise · error
resource command produced no output
Error message
resource command produced no output
What it means
run_resource_command runs the tool's command in isolation (null stdin/stderr, timeout, 4MB read cap) and returns its stdout. If the captured output trims to empty, it bails, because consumers (like completion script derivation) require non-empty output. This treats silent commands as failures since there is nothing to use downstream.
Source
Thrown at src/packslip.rs:1090
path: &Path,
args: &[String],
env: &BTreeMap<String, String>,
install_path: &Path,
timeout: std::time::Duration,
) -> Result<String> {
let work = tempfile::tempdir()?;
let output = CmdLineRunner::new(path)
.args(args)
.envs(env)
.prepend_path(vec![install_path.join(MISE_BINS_DIR)])?
.current_dir(work.path())
.stdin(std::process::Stdio::null())
.stderr(std::process::Stdio::null())
.with_timeout(timeout)
.read_isolated(4 * 1024 * 1024)
.await?;
if output.trim().is_empty() {
bail!("resource command produced no output");
}
Ok(output)
}
/// Derive a completion script from a CLI spec with the consumer's own
/// tooling. Only the `usage` format is known.
fn derive_from_spec(format: &str, bin: &str, spec: &Path, shell: &str) -> Result<String> {
if format != "usage" {
bail!("mise cannot derive completions from a {format} spec");
}
// Validate before returning a loader, so an invalid preferred spec still
// falls through to another resource source.
file::read_to_string(spec)?
.parse::<usage::Spec>()
.map_err(|err| eyre!("invalid usage specification: {err}"))?;
let shell = usage_rs::complete::Shell::from_name(shell)
.ok_or_else(|| eyre!("unsupported completion shell: {shell}"))?;
let path = completions::encode_spec_path(spec);View on GitHub (pinned to afd2eddd3a)
Solutions
- Run the command manually and confirm it prints non-empty output to stdout.
- Fix the exec entry to use the correct command/flags that emit stdout (e.g. correct completion subcommand).
- Ensure the command doesn't depend on stdin or a TTY (stdin is nulled and stderr discarded in isolated execution).
- If output is legitimately huge, reduce it or check it isn't being truncated by the 4MB read cap.
Example fix
# before: prints to stderr, stdout stays empty exec = ["rg", "--completion"] # after: correct subcommand that prints completions to stdout exec = ["rg", "--generate", "complete", "--"], # or the tool's documented completion command
Defensive patterns
Strategy: validation
Validate before calling
let out = Command::new(&program).args(args)
.stdin(Stdio::null()).stderr(Stdio::null()).output()?;
if out.stdout.iter().all(|&b| (b as char).is_whitespace()) {
eprintln!("{program} prints nothing to stdout; resource commands require non-empty stdout");
} Try / catch
match run_tool(config, &backend, &tv, &argv, &env).await {
Err(e) if e.to_string().contains("produced no output") => {
eprintln!("Run the command manually; ensure it writes completions to stdout (stderr is discarded)");
}
Ok(out) => use(out),
Err(e) => return Err(e),
} Prevention
- Confirm resource commands write to stdout, not stderr — stderr is nulled in isolated execution.
- Avoid commands requiring TTY or stdin; isolated runs use null stdin.
- Keep expected output well under the 4MB read cap.
- Test each manifest exec entry by running it manually before shipping.
When it happens
Trigger: An exec/resource command that writes nothing to stdout — e.g. a completion command that prints to stderr, a command whose output exceeded the 4MB read cap leaving nothing usable, or a command that failed silently — invoked via run_tool or fetch_files resource commands.
Common situations: Wrong completion flag for the tool (e.g. a flag that prints usage to stderr); command expects a TTY and prints nothing when stdin is null; the tool's completion subcommand was renamed so the command exits without stdout; output was empty because the tool requires an argument.
Related errors
- rustup show profile returned an empty profile for {}
- ditto failed copying {} to {}
- brew-cask: failed to generate {} completions from {}: {}
- must not record a pin before replacement succeeds
- packslip:{tool_name} is not a project name; use github.com/o
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/7f016e8d6c288fad.
Report an issue: GitHub.