jdx/mise · error · eyre::Report
deps run command cannot be empty
Error message
deps run command cannot be empty
What it means
`DepsCommand::from_string` (src/deps/mod.rs:124) wraps a provider's run string with the configured inline shell (`sh -c`-style) so pipes and `&&` work. An empty or whitespace-only command would spawn a shell that does nothing, so it is rejected up front with `run.trim().is_empty()`.
Source
Thrown at src/deps/mod.rs:136
pub env: BTreeMap<String, String>,
/// Working directory (defaults to project root)
pub cwd: Option<PathBuf>,
/// Human-readable description of what this command does
pub description: String,
}
impl DepsCommand {
/// Create a DepsCommand from a run string like "npm install"
///
/// Wraps the command with `sh -c` (matching task execution behavior)
/// so shell features like pipes, redirects, and `&&` work.
pub fn from_string(
run: &str,
project_root: &Path,
config: &rule::DepsProviderConfig,
) -> Result<Self> {
if run.trim().is_empty() {
bail!("deps run command cannot be empty");
}
let shell = Settings::get().default_inline_shell()?;
let (program, shell_args) = shell.split_first().ok_or_else(|| {
eyre::eyre!("default inline shell is empty; check unix_default_inline_shell_args / windows_default_inline_shell_args")
})?;
let mut args: Vec<String> = shell_args.to_vec();
args.push(run.to_string());
Ok(Self {
program: program.to_string(),
args,
env: config.env.clone(),
cwd: config
.dir
.as_ref()
.map(|d| project_root.join(d))View on GitHub (pinned to 9dcfcaa0dc)
Solutions
- Set a real command in the provider's run field
- If the run string is templated, verify every variable it references is defined and non-empty in that context
- Delete the provider block entirely if it was scaffolded but unused
Example fix
# before [deps.providers.mytool] run = "" # after [deps.providers.mytool] run = "mytool install"
Defensive patterns
Strategy: validation
Validate before calling
# reject empty run commands before mise loads them
import tomllib, sys
cfg = tomllib.load(open("mise.toml", "rb"))
for pid, p in cfg.get("deps", {}).get("providers", {}).items():
if not str(p.get("run", "")).strip():
sys.exit(f"provider {pid} has an empty run command") Prevention
- Never commit scaffolded provider blocks with placeholder empty runs — delete them until real
- If run strings are templated, default the variable (e.g. `run = "{{env.CMD|...}}"`) or assert it is set
- Lint deps config in CI alongside task config
When it happens
Trigger: A deps provider config whose run string is empty or only whitespace — `run = ""`, `run = " "` — or a templated run string whose variables expand to nothing when the config is resolved.
Common situations: Scaffolded/placeholder provider blocks that were never filled in; `run = "{{var}}"` with `var` unset; TOML/YAML indentation mistakes putting the command under the wrong key; commented-out runs leaving an empty string behind.
Related errors
- deps provider '{}' depends on unknown provider '{}'
- provider '{}' is inactive: {reason}
- '{}' depends on unknown '{}'
- duration must not be negative: {}
- Invalid date or duration: {s}. Expected formats: '2024-06-01
AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17).
Data as JSON: /api/errors/888315e0086d5733.
Report an issue: GitHub.