jdx/mise · error
remote mise command must be an executable name or path
Error message
remote mise command must be an executable name or path: {command:?} What it means
The `mise` command used on the remote host is validated by `validate_remote_executable`: it must be either a bare executable name with no whitespace, or a path (containing '/'). Values starting with '-' (option injection), containing newlines, or being a multi-word string that is not a path are rejected because they would be unsafe or unquoteable when embedded into the remote shell command.
Solutions
- Set the value to a single executable name (e.g. 'mise') or a single absolute path (e.g. '/opt/mise/bin/mise') with no arguments
- Move any extra flags/arguments out of the mise-command config and into the command/args it runs
- Remove leading dashes and embedded newlines from the value
Example fix
// before mise_command = "mise --dir /proj exec --" // after mise_command = '/opt/mise/bin/mise'
Defensive patterns
Strategy: validation
Validate before calling
const isPath = cmd.includes('/');
if (cmd.startsWith('-') || /[\n\r]/.test(cmd) || (!isPath && /\s/.test(cmd)))
throw new Error('mise command must be a name or path, no args'); Type guard
const isExecutableSpec = (s: unknown): s is string => {
if (typeof s !== 'string') return false;
const isPath = s.includes('/');
return !s.startsWith('-') && !/[\n\r]/.test(s) && (isPath || !/\s/.test(s));
}; Try / catch
try { validate_remote_executable(cmd)?; } catch (e) {
// strip arguments from the configured command and retry
} Prevention
- Keep the remote mise command a single token: name or absolute path
- Pass flags/arguments via the command's own args, never the executable setting
- Reject values starting with '-' in config validation
- Add shellcheck-style linting for remote command settings
When it happens
Trigger: Configuring the remote mise command as a full shell invocation like 'mise --dir /x exec' or '/opt/mise mise run', a value starting with '-', or a multi-line value.
Common situations: Users trying to smuggle extra flags into the remote command; whitespace in quoted install paths; copy-paste errors adding line breaks or leading dashes.
Understand the failure class
Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.
Related errors
- agent ' ' `start_calendar_interval. ` must be between and
- agent ' ' `start_calendar_interval` must set at least one…
- agent ' ' `start_calendar_interval` must not be empty
- agent ' ' `queue_directories` must not contain empty entries
- an exec entry with no command
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/48662249ccecb87d.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/remote.rs:2240
bail!("install_mise must not contain '..': {path:?}");
}
if matches!(
path.rsplit('/').next(),
None | Some("") | Some(".") | Some("~")
) {
bail!("install_mise must name an executable file: {path:?}");
}
Ok(())
}
fn validate_remote_executable(command: &str) -> Result<()> {
validate_value("mise command", command)?;
let is_path = command.contains('/');
if command.starts_with('-')
|| command.contains(['\n', '\r'])
|| (!is_path && command.chars().any(char::is_whitespace))
{
bail!("remote mise command must be an executable name or path: {command:?}");
}
Ok(())
}
fn shell_quote(value: &str) -> String {
shell_words::join([value])
}
fn normalize_os(value: &str) -> String {
match value.trim().to_ascii_lowercase().as_str() {
"darwin" | "macos" => "macos".to_string(),
"linux" => "linux".to_string(),
other => other.to_string(),
}
}
fn normalize_arch(value: &str) -> String {
match value.trim().to_ascii_lowercase().as_str() {View on GitHub (pinned to 533346cc37)