jdx/mise · error

relay unavailable

Error message

relay unavailable

What it means

Same UNC/cmd.exe guard as the inline-task check, but applied when mise actually spawns the task's command with cmd.current_dir(dir). Unless --dry-run (where nothing is spawned), mise bails out if the requested program is cmd.exe and the directory is a UNC path, because cmd.exe would fall back to C:\Windows.

Solutions

  1. Use a UNC-capable shell: set shell = "pwsh -c" on the task.
  2. Set mise settings windows_default_inline_shell_args="pwsh -c" (inline) and windows_default_file_shell_args accordingly (file tasks).
  3. Move the working directory off the UNC share (map a drive letter or use a local clone).

Example fix

// before
mise settings windows_default_file_shell_args="cmd /C"

// after
mise settings windows_default_file_shell_args="pwsh -c"
Defensive patterns

Strategy: validation

Validate before calling

// before spawning tasks, ensure cwd is not a UNC path
if (Get-Location).Path.StartsWith('\\\\')) { throw 'use a mapped drive for mise tasks' }

Prevention

When it happens

Trigger: Task execution on Windows where the process's current_dir is set to a UNC path and the resolved program/shell is cmd.exe; occurs in the non-dry-run spawn path of task execution.

Common situations: Running tasks from a network share or \\wsl$ mount with the default cmd.exe shell; file tasks whose shell comes from windows_default_file_shell_args defaulting to cmd.exe.

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/cce2a76231028bb5. Report an issue: GitHub.

Appendix: source

Thrown at src/github_relay.rs:819

                            builder = builder.header(name, value);
                        }
                    }
                    let stream = futures_util::stream::try_unfold(
                        (response, permit),
                        |(mut response, permit)| async move {
                            let chunk = response
                                .chunk()
                                .await
                                .map_err(|_| std::io::Error::other("relay disconnected"))?;
                            Ok::<_, std::io::Error>(chunk.map(|chunk| (chunk, (response, permit))))
                        },
                    );
                    Ok(builder.body(Body::from_stream(stream))?)
                }
                .await;
                result.unwrap_or_else(|_| {
                    Response::builder()
                        .status(403)
                        .body(Body::from("relay unavailable"))
                        .expect("valid response")
                })
            }
        });
        let task = tokio::spawn(async move {
            let _ = axum::serve(BoundedListener::new(listener), service).await;
        });
        // Aborting this task is sufficient here: exiting the adapter also closes
        // all accepted loopback connections. Local broker cancellation is separate.
        let guard = AbortTask(task);
        let mut child = if command.is_empty() {
            let shell = std::env::var_os("SHELL").unwrap_or_else(|| "/bin/sh".into());
            let mut child = tokio::process::Command::new(shell);
            child.arg("-l");
            child
        } else {
            let mut child = tokio::process::Command::new(&command[0]);

View on GitHub (pinned to 533346cc37)