jdx/mise · error
remote mise environment cannot contain a comma
Error message
remote mise environment cannot contain a comma: {env} What it means
Each mise_env entry is passed as a single KEY=VALUE token; values containing commas cannot be represented in the remote environment serialization, so validate_with_source rejects any mise_env value containing a comma after the general validate_value check passes.
Solutions
- Split into multiple mise_env entries where the target tool supports repeated keys.
- Use a separator the remote tool accepts (e.g. spaces or colons) instead of commas.
- Escape/transform the value so commas aren't needed, or set it via a bootstrap/scripted mechanism.
Example fix
// before mise_env = ["FEATURES=a,b,c"] // after mise_env = ["FEATURES=a b c"]
Defensive patterns
Strategy: validation
Validate before calling
function assertMiseEnv(envList) {
for (const e of envList || []) {
if (e.includes(',')) throw new Error(`remote mise environment cannot contain a comma: ${e}`);
}
} Prevention
- Join list-valued env vars with spaces or the tool's accepted separator, never commas.
- Split comma-separated values into multiple entries when the target supports repeats.
- Lint remote host env entries for ',' before commit.
When it happens
Trigger: A remote host entry has a mise_env item like `FEATURES=a,b,c`; validate() or apply_overrides() iterate mise_env and bail on the comma check.
Common situations: Setting comma-separated list env vars (CARGO_FEATURES, RUSTFLAGS-like lists, tool whitelists); building the env var from a joined list with ',' separator.
Understand the failure class
Background: "is not a valid" / "Invalid ... value" environment variable errors: how libraries validate env vars and what to do when they reject yours — this error's family across 48 libraries.
Related errors
- remote host ' ' bootstrap command contains NUL
- remote host ' ' cannot combine install_mise with…
- remote host ' ' must set at most one of mise_bin…
- remote host ' ' port must be greater than zero
- bootstrap_command returned an unsafe mise path
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/53caf2d5a0b1925d.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/remote.rs:394
bail!(
"remote host '{}' cannot combine install_mise with remote_mise or bootstrap_command, which already provide mise on the host",
self.name
);
}
validate_install_mise_path(install_mise).wrap_err_with(|| {
format!("remote host '{}' has an invalid install_mise", self.name)
})?;
}
for option in &self.ssh_options {
validate_value("SSH option", option)?;
}
for exclude in &self.exclude {
validate_value("archive exclude", exclude)?;
}
for env in &self.mise_env {
validate_value("mise environment", env)?;
if env.contains(',') {
bail!("remote mise environment cannot contain a comma: {env}");
}
}
if let Some(remote_mise) = &self.remote_mise {
validate_remote_executable(remote_mise)?;
}
if self
.bootstrap_command
.as_ref()
.is_some_and(|command| command.contains('\0'))
{
bail!("remote host '{}' bootstrap command contains NUL", self.name);
}
Ok(())
}
}
pub(crate) async fn run(
host: &RemoteHost,View on GitHub (pinned to 533346cc37)