{"record":{"id":"53caf2d5a0b1925d","repo":"jdx/mise","slug":"remote-mise-environment-cannot-contain-a-comma-e","errorCode":null,"errorMessage":"remote mise environment cannot contain a comma: {env}","messagePattern":"remote mise environment cannot contain a comma: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/remote.rs","lineNumber":394,"sourceCode":"                bail!(\n                    \"remote host '{}' cannot combine install_mise with remote_mise or bootstrap_command, which already provide mise on the host\",\n                    self.name\n                );\n            }\n            validate_install_mise_path(install_mise).wrap_err_with(|| {\n                format!(\"remote host '{}' has an invalid install_mise\", self.name)\n            })?;\n        }\n        for option in &self.ssh_options {\n            validate_value(\"SSH option\", option)?;\n        }\n        for exclude in &self.exclude {\n            validate_value(\"archive exclude\", exclude)?;\n        }\n        for env in &self.mise_env {\n            validate_value(\"mise environment\", env)?;\n            if env.contains(',') {\n                bail!(\"remote mise environment cannot contain a comma: {env}\");\n            }\n        }\n        if let Some(remote_mise) = &self.remote_mise {\n            validate_remote_executable(remote_mise)?;\n        }\n        if self\n            .bootstrap_command\n            .as_ref()\n            .is_some_and(|command| command.contains('\\0'))\n        {\n            bail!(\"remote host '{}' bootstrap command contains NUL\", self.name);\n        }\n        Ok(())\n    }\n}\n\npub(crate) async fn run(\n    host: &RemoteHost,","sourceCodeStart":376,"sourceCodeEnd":412,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/remote.rs#L376-L412","documentation":"Thrown by `RemoteHostConfig::validate_with_source` when an entry in `mise_env` contains a comma. Remote mise environment variables are passed as a comma-joined list to the remote host, so a comma inside a value would corrupt the serialization and is rejected.","triggerScenarios":"Setting `mise_env = [\"FOO=a,b\"]` (or any value containing ',') on a remote host entry and running a remote operation that triggers `validate`/`apply_overrides`.","commonSituations":"Passing comma-separated lists (e.g. `RUSTFLAGS=\"-C target-cpu=native,lto\"`) through mise_env; unquoted values with commas copied from shell exports.","solutions":["Remove the comma or split the value into multiple mise_env entries","Encode the value differently (e.g. use a different separator the remote tool accepts)","If a comma-separated list is unavoidable, pass it via a config file or remote env mechanism instead of mise_env"],"exampleFix":"// before\nmise_env = [\"RUSTFLAGS=-C target-cpu=native,lto\"]\n// after\nmise_env = [\"RUSTFLAGS=-C target-cpu=native\"]","handlingStrategy":"validation","validationCode":"for env in &host.mise_env {\n    if env.contains(',') {\n        panic!(\"mise_env entry contains comma: {}\", env);\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep commas out of mise_env values; pass lists via config files instead","Split compound values into multiple entries where possible","Document the comma serialization constraint for your team"],"tags":["remote","config-validation","environment-variables"],"backgroundTag":"invalid-argument-value","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}