Skip to content

[Bug]: Source control (Azure DevOps): VcsProcessSpawnError on Windows because Node child_process.spawn cannot resolve az.cmd #2576

Closed

Description

@kilyess

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/desktop

Steps to reproduce

  1. Install Azure CLI 2.86.0 on Windows; verify az --version works in cmd.exe.
  2. Install the azure-devops extension and run az login; verify az repos pr list --detect true --top 1 --output json works in cmd.exe inside an ADO repo.
  3. Open T3 Code.
  4. Click the "Create PR" button.
  5. Server log shows Source control provider azure-devops failed in listChangeRequests: VcsProcessSpawnError followed by VCS process failed to spawn in AzureDevOpsCli.execute: az repos pr list --detect true --source-branch <branch> --status active --top 1 --only-show-errors --output json (<cwd>). The Create PR flow never opens.
  6. Outside T3 Code: node -e "require('child_process').spawnSync('az', ['--version'], {stdio:'inherit'})" fails silently with spawn az ENOENT; same call with {shell:true} works (Node 22+ also prints DEP0190 deprecation).

Expected behavior

On Windows, T3 Code resolves az (and any other .cmd/.bat-shimmed CLI such as gh, glab, npm) the same way cmd.exe does — by consulting PATHEXT and falling through to az.cmd. Source control discovery for Azure DevOps succeeds when az + the azure-devops extension are installed and authenticated.

Actual behavior

On Windows, every spawn of az fails before the child process starts. T3 Code surfaces a generic VcsProcessSpawnError with no install hint, even though az is on PATH and works in cmd.exe / PowerShell. The reactive error classifier in AzureDevOpsCli.ts ("command not found: az", "enoent", etc.) never runs because the failure happens at the child_process.spawn boundary inside the Effect platform-node spawner, not inside az itself. Result: Azure DevOps integration is completely unusable on Windows hosts.

Impact

Major degradation or frequent failure

Version or commit

main @ f4c9418

Environment

Windows 11 Pro, T3 Code Alpha v0.0.22, Node v24.11.1

Logs or stack traces

Source control provider azure-devops failed in listChangeRequests: VcsProcessSpawnError
VCS process failed to spawn in AzureDevOpsCli.execute: az repos pr list --detect true --source-branch <branch> --status active --top 1 --only-show-errors --output json (<cwd>)


Reproduction outside T3 Code (Node only):


> node -e "const r = require('child_process').spawnSync('az', ['--version']); console.log(JSON.stringify({status: r.status, error: r.error && r.error.message, stderr: r.stderr.toString()}, null, 2))"
{
  "status": null,
  "error": "spawn az ENOENT",
  "stderr": ""
}

> node -e "const r = require('child_process').spawnSync('az', ['--version'], {shell: true}); console.log(JSON.stringify({status: r.status, stdoutSnippet: r.stdout.toString().slice(0,40)}, null, 2))"
(node:50260) [DEP0190] DeprecationWarning: Passing args to a child process with shell option true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated.
{
  "status": 0,
  "stdoutSnippet": "azure-cli                         2.86.0"
}

Screenshots, recordings, or supporting files

Image
Image

Workaround

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions