Skip to content

Invoke the System32 tar.exe in bootstrap.ps1 Rather Than Whatever tar PATH Resolves #2471

Closed

Description

@ptr727

What happens

host-setup/bootstrap.ps1 extracts the downloaded archive with & tar -xzf $archive -C $staging --strip-components=1 (line 276 on main at ac50fd1). tar resolves through PATH. The script's own comment (line 476) assumes it reaches the tar.exe that Windows ships under %SystemRoot%\System32.

When pwsh is launched from Git Bash, which is the shell Claude Code's Bash tool runs on Windows, Git's /usr/bin comes first on PATH. tar then resolves to MSYS GNU tar. That tar reads the drive prefix of C:\...\<tree>.tar.gz as a remote host, so the extraction fails:

tar (child): Cannot connect to C: resolve failed
/usr/bin/tar: Error is not recoverable: exiting now
ERROR: Could not extract the downloaded archive

The same -Skills -Yes run launched from PowerShell resolves C:\WINDOWS\system32\tar.exe and succeeds. Observed on Windows 11 while refreshing Skills after the 2.0.857 release.

Done means

  • The bootstrap invokes Join-Path $env:SystemRoot 'System32\tar.exe' explicitly, both at the extraction and at the line-479 presence check, so the PATH order of the shell that launched it cannot change which tar runs.
  • A native Windows run of bootstrap.ps1 -Skills -Yes launched from Git Bash succeeds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions