jdx/mise · error

GitHub relay request denied or unavailable

Error message

GitHub relay request denied or unavailable

What it means

mise refuses to run a task whose shell is cmd.exe while the working directory is a UNC path (\\server\share\...). cmd.exe cannot be launched with a UNC current directory; Windows silently starts it in C:\Windows, which would execute the command somewhere the user never asked. mise stops instead of silently misbehaving.

Solutions

  1. Set the task's shell to one that supports UNC paths: shell = "pwsh -c" in the task definition.
  2. Set the global setting: mise settings windows_default_inline_shell_args="pwsh -c".
  3. Map the UNC share to a drive letter (net use) and work from the mapped path instead.

Example fix

// before (mise.toml)
[tasks.build]
run = "cargo build"

// after
[tasks.build]
run = "cargo build"
shell = "pwsh -c"
Defensive patterns

Strategy: validation

Validate before calling

// Windows shell script, before running mise tasks
if [[ "$PWD" == \\* ]]; then echo "UNC cwd not supported by cmd.exe tasks"; fi

Prevention

When it happens

Trigger: Running a task (via `mise run`/`mise x`/dependencies) on Windows where the project lives on a UNC share (mapped drive absent, network share, WSL \\wsl$ path) and the resolved inline shell is cmd.exe. `command_inputs` processing reaches this spawn path even for file-reading tasks; `--dry-run` does not.

Common situations: Cloning a project onto a network share or accessing it via \\wsl$ from Windows; running tasks in CI containers mounting the workspace as a share; default shell is cmd.exe because windows_default_inline_shell_args was not changed.

Understand the failure class

Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/50930078d641d551. Report an issue: GitHub.

Appendix: source

Thrown at src/github_relay.rs:597

        let result = tokio::select! {
            biased;
            _ = cancel.cancelled() => Err(eyre::eyre!("session ended")),
            result = tokio::time::timeout(audit.options.request_timeout, forward(broker, request)) => result.unwrap_or_else(|_| Err(eyre::eyre!("request timeout"))),
        };
        let status = result.as_ref().map(|r| r.status().as_u16()).unwrap_or(403);
        if status >= 400 {
            audit
                .denied
                .fetch_add(1, std::sync::atomic::Ordering::Relaxed);
        }
        if audit.options.log_requests && result.is_err() {
            audit.emit(serde_json::json!({"event": "request", "operation": operation, "status": status, "headers_ms": started.elapsed().as_millis()}));
        }
        match result {
            Ok(response) => response,
            // Deliberately never serialize upstream errors, URLs or credentials.
            Err(_) => Response::builder()
                .status(403)
                .body(Body::from("GitHub relay request denied or unavailable"))
                .expect("valid response"),
        }
    }

    async fn forward(broker: Broker, request: Request) -> Result<Response> {
        let deadline = tokio::time::Instant::now() + broker.audit.options.request_timeout;
        let operation = broker.audit.operation(&broker.scope, &request);
        let permit = broker.permits.clone().try_acquire_owned()?;
        let target = authorize(
            &broker.scope,
            request.method().as_str(),
            request.uri().path().strip_prefix('/').unwrap_or_default(),
            request.uri().query(),
        )?;
        let (parts, body) = request.into_parts();
        let body = to_bytes(body, 8 * 1024 * 1024).await?;
        if parts.method != Method::POST && !body.is_empty() {

View on GitHub (pinned to 533346cc37)