{"record":{"id":"888315e0086d5733","repo":"jdx/mise","slug":"deps-run-command-cannot-be-empty","errorCode":null,"errorMessage":"deps run command cannot be empty","messagePattern":"deps run command cannot be empty","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/deps/mod.rs","lineNumber":138,"sourceCode":"    pub env: BTreeMap<String, String>,\n    /// Working directory (defaults to project root)\n    pub cwd: Option<PathBuf>,\n    /// Human-readable description of what this command does\n    pub description: String,\n}\n\nimpl DepsCommand {\n    /// Create a DepsCommand from a run string like \"npm install\"\n    ///\n    /// Wraps the command with `sh -c` (matching task execution behavior)\n    /// so shell features like pipes, redirects, and `&&` work.\n    pub(crate) fn from_string(\n        run: &str,\n        project_root: &Path,\n        config: &rule::DepsProviderConfig,\n    ) -> Result<Self> {\n        if run.trim().is_empty() {\n            bail!(\"deps run command cannot be empty\");\n        }\n\n        let shell = Settings::get().default_inline_shell()?;\n        let (program, shell_args) = shell.split_first().ok_or_else(|| {\n            eyre::eyre!(\"default inline shell is empty; check unix_default_inline_shell_args / windows_default_inline_shell_args\")\n        })?;\n\n        let mut args: Vec<String> = shell_args.to_vec();\n        args.push(run.to_string());\n\n        Ok(Self {\n            inline: true,\n            program: program.to_string(),\n            args,\n            env: config.env.clone(),\n            cwd: config\n                .dir\n                .as_ref()","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/deps/mod.rs#L120-L156","documentation":"`DepsCommand::from_string` converts a textual `run` command from a deps provider config into an executable command. If the string is empty (or only whitespace), there is nothing to execute, so mise rejects it at parse time.","triggerScenarios":"A deps provider entry's `run` field is `\"\"` or whitespace when `from_string` parses the provider config.","commonSituations":"Hand-editing mise.toml and leaving `run = \"\"`; templated/interpolated config where a variable expands to empty; copy-paste that dropped the command.","solutions":["Set a non-empty `run` command string in the deps provider config","If the value is interpolated, ensure the variable resolves to a real command","Remove the provider entry entirely if no run command is needed"],"exampleFix":"// before (mise.toml)\n[deps.providers.mine]\nrun = \"\"\n// after\n[deps.providers.mine]\nrun = \"cargo add {{packages}}\"","handlingStrategy":"validation","validationCode":"if run.trim().is_empty() {\n    return Err(\"deps provider 'run' must be a non-empty command\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate mise.toml after editing (run any mise command to parse it)","Avoid interpolating variables into `run` that may expand empty","Keep provider templates in version control with examples"],"tags":["deps","config","empty-value"],"backgroundTag":"empty-required-field","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}