{"record":{"id":"cce2a76231028bb5","repo":"jdx/mise","slug":"relay-unavailable","errorCode":null,"errorMessage":"relay unavailable","messagePattern":"relay unavailable","errorType":"http","errorClass":null,"httpStatus":403,"severity":"error","filePath":"src/github_relay.rs","lineNumber":819,"sourceCode":"                            builder = builder.header(name, value);\n                        }\n                    }\n                    let stream = futures_util::stream::try_unfold(\n                        (response, permit),\n                        |(mut response, permit)| async move {\n                            let chunk = response\n                                .chunk()\n                                .await\n                                .map_err(|_| std::io::Error::other(\"relay disconnected\"))?;\n                            Ok::<_, std::io::Error>(chunk.map(|chunk| (chunk, (response, permit))))\n                        },\n                    );\n                    Ok(builder.body(Body::from_stream(stream))?)\n                }\n                .await;\n                result.unwrap_or_else(|_| {\n                    Response::builder()\n                        .status(403)\n                        .body(Body::from(\"relay unavailable\"))\n                        .expect(\"valid response\")\n                })\n            }\n        });\n        let task = tokio::spawn(async move {\n            let _ = axum::serve(BoundedListener::new(listener), service).await;\n        });\n        // Aborting this task is sufficient here: exiting the adapter also closes\n        // all accepted loopback connections. Local broker cancellation is separate.\n        let guard = AbortTask(task);\n        let mut child = if command.is_empty() {\n            let shell = std::env::var_os(\"SHELL\").unwrap_or_else(|| \"/bin/sh\".into());\n            let mut child = tokio::process::Command::new(shell);\n            child.arg(\"-l\");\n            child\n        } else {\n            let mut child = tokio::process::Command::new(&command[0]);","sourceCodeStart":801,"sourceCodeEnd":837,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/github_relay.rs#L801-L837","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Use a UNC-capable shell: set shell = \"pwsh -c\" on the task.","Set mise settings windows_default_inline_shell_args=\"pwsh -c\" (inline) and windows_default_file_shell_args accordingly (file tasks).","Move the working directory off the UNC share (map a drive letter or use a local clone)."],"exampleFix":"// before\nmise settings windows_default_file_shell_args=\"cmd /C\"\n\n// after\nmise settings windows_default_file_shell_args=\"pwsh -c\"","handlingStrategy":"validation","validationCode":"// before spawning tasks, ensure cwd is not a UNC path\nif (Get-Location).Path.StartsWith('\\\\\\\\')) { throw 'use a mapped drive for mise tasks' }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep both windows_default_inline_shell_args and windows_default_file_shell_args set to a UNC-capable shell (pwsh).","Avoid \\\\wsl$ / network shares as task working directories on Windows.","Map shares to drive letters with `net use` before running tasks."],"tags":["windows","unc-path","tasks","cmd"],"backgroundTag":"unsupported-platform","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"}