{"record":{"id":"2c978f90b3e4a732","repo":"jdx/mise","slug":"err","errorCode":null,"errorMessage":"{} {err}","messagePattern":"\\{\\} \\{err\\}","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/exec.rs","lineNumber":546,"sourceCode":"    };\n    if crate::file::is_active_mise_shim(std::path::Path::new(&program)) {\n        return Err(eyre::eyre!(\n            \"recursive shim invocation detected: {}\",\n            program.to_string_lossy()\n        ));\n    }\n    env::remove_var(env::MISE_SHIM_PATH_ENV);\n    // Apply sandbox (Landlock/seccomp on Linux, sandbox-exec on macOS)\n    let args_str: Vec<String> = args\n        .iter()\n        .map(|a| a.to_string_lossy().into_owned())\n        .collect();\n    if let Some(sandboxed) = sandbox.apply(&program.to_string_lossy(), &args_str).await? {\n        // macOS: exec through sandbox-exec\n        let err = exec::Command::new(&sandboxed.program)\n            .args(&sandboxed.args)\n            .exec();\n        bail!(\"{} {err}\", sandboxed.program);\n    }\n\n    let err = exec::Command::new(program.clone()).args(&args).exec();\n    let mut msg = format!(\"{:?} {err}\", program.to_string_lossy());\n    // The bin never resolved on PATH. If an installed-but-unconfigured tool\n    // would have provided it, say so instead of leaving the user with a bare\n    // ENOENT (discussion #4407).\n    if resolution_failed && let Some(hint) = crate::shims::exec_resolution_hint(&program_name).await\n    {\n        msg.push_str(\"\\n\\n\");\n        msg.push_str(&hint);\n    }\n    bail!(\"{msg}\")\n}\n\n/// The opaque `cannot find binary path`, plus an explanation when an\n/// installed-but-unconfigured tool would have provided the bin. `mise install`\n/// writes to no config file, so its tool dirs never join the PATH `mise exec`","sourceCodeStart":528,"sourceCodeEnd":564,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/exec.rs#L528-L564","documentation":"`mise exec` (and run) reached the point of exec'ing the target program and the exec failed; the error prefixes the sandboxed or target program path with the underlying std::process error. Because exec replaces the process, any failure surfaces here as a bail.","triggerScenarios":"exec::Command::new(...).exec() returns an error — most commonly ENOENT because the program or a sandbox-exec wrapper path does not exist, or EACCES for a non-executable file. On macOS this fires for the sandboxed program when sandbox.apply rewrote the command.","commonSituations":"Typo in the binary name passed to `mise exec`, tool installed but bin missing, non-executable file, or macOS sandbox-exec wrapper path invalid.","solutions":["Check the exact program name/path in the message and verify it exists (`which <prog>` or full path)","Ensure the tool providing the binary is installed and its bin dir is on the mise-built PATH","Check execute permissions on the file","See the following resolution hint error (285) for installed-but-unconfigured tool hints"],"exampleFix":"// before\nmise exec -- mytool --version   # mytool not installed\n// after\nmise use node@20        # or install the tool providing mytool\nmise exec -- mytool --version","handlingStrategy":"validation","validationCode":"command -v mytool >/dev/null || echo 'mytool not on PATH'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Verify binaries resolve before mise exec","Install tools via mise use so PATH is built correctly"],"tags":["cli","exec","process"],"backgroundTag":"command-not-found","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"}