{"record":{"id":"50930078d641d551","repo":"jdx/mise","slug":"github-relay-request-denied-or-unavailable","errorCode":null,"errorMessage":"GitHub relay request denied or unavailable","messagePattern":"GitHub relay request denied or unavailable","errorType":"http","errorClass":null,"httpStatus":403,"severity":"error","filePath":"src/github_relay.rs","lineNumber":597,"sourceCode":"        let result = tokio::select! {\n            biased;\n            _ = cancel.cancelled() => Err(eyre::eyre!(\"session ended\")),\n            result = tokio::time::timeout(audit.options.request_timeout, forward(broker, request)) => result.unwrap_or_else(|_| Err(eyre::eyre!(\"request timeout\"))),\n        };\n        let status = result.as_ref().map(|r| r.status().as_u16()).unwrap_or(403);\n        if status >= 400 {\n            audit\n                .denied\n                .fetch_add(1, std::sync::atomic::Ordering::Relaxed);\n        }\n        if audit.options.log_requests && result.is_err() {\n            audit.emit(serde_json::json!({\"event\": \"request\", \"operation\": operation, \"status\": status, \"headers_ms\": started.elapsed().as_millis()}));\n        }\n        match result {\n            Ok(response) => response,\n            // Deliberately never serialize upstream errors, URLs or credentials.\n            Err(_) => Response::builder()\n                .status(403)\n                .body(Body::from(\"GitHub relay request denied or unavailable\"))\n                .expect(\"valid response\"),\n        }\n    }\n\n    async fn forward(broker: Broker, request: Request) -> Result<Response> {\n        let deadline = tokio::time::Instant::now() + broker.audit.options.request_timeout;\n        let operation = broker.audit.operation(&broker.scope, &request);\n        let permit = broker.permits.clone().try_acquire_owned()?;\n        let target = authorize(\n            &broker.scope,\n            request.method().as_str(),\n            request.uri().path().strip_prefix('/').unwrap_or_default(),\n            request.uri().query(),\n        )?;\n        let (parts, body) = request.into_parts();\n        let body = to_bytes(body, 8 * 1024 * 1024).await?;\n        if parts.method != Method::POST && !body.is_empty() {","sourceCodeStart":579,"sourceCodeEnd":615,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/github_relay.rs#L579-L615","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Set the task's shell to one that supports UNC paths: shell = \"pwsh -c\" in the task definition.","Set the global setting: mise settings windows_default_inline_shell_args=\"pwsh -c\".","Map the UNC share to a drive letter (net use) and work from the mapped path instead."],"exampleFix":"// before (mise.toml)\n[tasks.build]\nrun = \"cargo build\"\n\n// after\n[tasks.build]\nrun = \"cargo build\"\nshell = \"pwsh -c\"","handlingStrategy":"validation","validationCode":"// Windows shell script, before running mise tasks\nif [[ \"$PWD\" == \\\\* ]]; then echo \"UNC cwd not supported by cmd.exe tasks\"; fi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Clone projects onto a local drive or mapped drive letter, not a raw UNC share.","Set windows_default_inline_shell_args to \"pwsh -c\" globally on Windows dev machines.","Remember --dry-run will not surface this error; test real task runs from shared paths."],"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"}