{"record":{"id":"966ceb00c9429fc3","repo":"jdx/mise","slug":"invalid-remote-global-configuration-path","errorCode":null,"errorMessage":"invalid remote global configuration path","messagePattern":"invalid remote global configuration path","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/remote.rs","lineNumber":622,"sourceCode":"            install.push(\"--repository-yes\");\n        }\n        // the whole operation previews: the helper inspects the target and the\n        // repository and says what it would write, before the bootstrap preview\n        if options.dry_run {\n            install.push(\"--repository-dry-run\");\n        }\n        if preview_setup {\n            install.extend([\"--repository-preview-directory\", &preview_directory]);\n        }\n        // The helper uses the target's XDG/global-config environment. Only its\n        // absolute result, never the staging directory, becomes trusted config.\n        let path = session\n            .output_async(&[&mise, \"ssh\", \"--global-config-directory\"])\n            .await?\n            .trim()\n            .to_string();\n        if !path.starts_with('/') || path.contains(['\\n', '\\r']) {\n            bail!(\"invalid remote global configuration path\");\n        }\n        session.status_async(&install, true).await?;\n        if options.dry_run && !preview_setup && !remote_directory_exists(session, &path).await? {\n            // nothing was written, so there is no configuration to preview the\n            // bootstrap against yet\n            miseprintln!(\n                \"Would then run `mise bootstrap --dry-run` in {path} on {} once the configuration exists there\",\n                session.host.name\n            );\n            if options.relay.is_some() {\n                info!(\n                    \"borrowed GitHub access has ended; future private updates require remote credentials or another relay-enabled session\"\n                );\n            }\n            return Ok(());\n        }\n        if preview_setup {\n            preview_directory","sourceCodeStart":604,"sourceCodeEnd":640,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/remote.rs#L604-L640","documentation":"During `mise ssh` staging, mise runs the remote helper `mise ssh --global-config-directory` and expects a single absolute directory path for the trusted global config location. This error means the returned string was empty, relative, or contained newline/CR characters, so it cannot be trusted as a config directory path. mise throws it defensively because only this absolute path becomes trusted configuration on the remote host.","triggerScenarios":"Running a staged `mise ssh` bootstrap with a repository bundle (run_staged); the remote helper command `mise ssh --global-config-directory` outputs a path not starting with '/' or containing '\\n' or '\\r'.","commonSituations":"The remote mise binary is an old or differently-built version whose `ssh --global-config-directory` subcommand prints extra text, a relative path, or nothing; a shell profile on the host echoes output before the command result; MISE_CONFIG_DIR is misconfigured to a relative path on the remote.","solutions":["SSH into the host manually and run the provisioned mise with `ssh --global-config-directory` to inspect what it actually prints","Update the remote mise helper binary to the current version so the subcommand emits a single absolute path","Remove or fix profile/rc scripts on the host that print output during non-interactive shell commands","Ensure MISE_CONFIG_DIR / XDG_CONFIG_HOME on the remote resolve to absolute directories"],"exampleFix":"// before: host profile prints banners on every non-interactive shell\n~/.bashrc: echo \"Welcome to $HOST\"\n// after: guard interactive-only output\n~/.bashrc: [[ $- == *i* ]] && echo \"Welcome to $HOST\"","handlingStrategy":"validation","validationCode":"# on the host, before mise ssh\nout=$(mise ssh --global-config-directory | tr -d '\\n\\r')\ncase \"$out\" in /*) echo \"ok: $out\";; *) echo \"bad: $out\"; exit 1;; esac","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep remote mise helper binaries up to date","Guard interactive-only echo statements in remote shell profiles","Pin absolute XDG_CONFIG_HOME/MISE_CONFIG_DIR on remote hosts"],"tags":["ssh","remote","config-path"],"backgroundTag":"invalid-config-value","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"}