From b63e746758b41009eecd38ec55cf2106b5b81883 Mon Sep 17 00:00:00 2001 From: Ashwin Bhat Date: Mon, 5 Jan 2026 22:44:55 +0530 Subject: [PATCH 1/5] fix: improve Windows Claude Code installation in CI workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add verification that claude.exe exists after installation - Fail early with clear error message if executable not found - Replace Out-File with Add-Content for more reliable GITHUB_PATH handling - Apply fix to both test-e2e and test-examples jobs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/test.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 79ccea1..a4e2ee6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -66,7 +66,13 @@ jobs: run: | irm https://claude.ai/install.ps1 | iex $claudePath = "$env:USERPROFILE\.local\bin" - echo "$claudePath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + if (Test-Path "$claudePath\claude.exe") { + Write-Host "Claude installed at: $claudePath\claude.exe" + } else { + Write-Error "Claude executable not found at $claudePath\claude.exe" + exit 1 + } + Add-Content -Path $env:GITHUB_PATH -Value $claudePath shell: pwsh - name: Verify Claude Code installation @@ -131,7 +137,13 @@ jobs: run: | irm https://claude.ai/install.ps1 | iex $claudePath = "$env:USERPROFILE\.local\bin" - echo "$claudePath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + if (Test-Path "$claudePath\claude.exe") { + Write-Host "Claude installed at: $claudePath\claude.exe" + } else { + Write-Error "Claude executable not found at $claudePath\claude.exe" + exit 1 + } + Add-Content -Path $env:GITHUB_PATH -Value $claudePath shell: pwsh - name: Verify Claude Code installation From 9ad88cd22515c2cfc441ce127b400ed9afca0a8e Mon Sep 17 00:00:00 2001 From: Ashwin Bhat Date: Mon, 5 Jan 2026 22:50:07 +0530 Subject: [PATCH 2/5] fix: add debugging and search for claude.exe on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Claude installer reports success but the file isn't at the expected location. This adds: - Debug output showing directory contents - Search across common installation paths - Fallback recursive search to find claude.exe 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/test.yml | 78 +++++++++++++++++++++++++++++++++----- 1 file changed, 68 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a4e2ee6..5c2f2da 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -66,13 +66,42 @@ jobs: run: | irm https://claude.ai/install.ps1 | iex $claudePath = "$env:USERPROFILE\.local\bin" - if (Test-Path "$claudePath\claude.exe") { - Write-Host "Claude installed at: $claudePath\claude.exe" + # Debug: show what's in the installation directory + Write-Host "Checking $claudePath..." + if (Test-Path $claudePath) { + Get-ChildItem $claudePath | ForEach-Object { Write-Host " $_" } } else { - Write-Error "Claude executable not found at $claudePath\claude.exe" - exit 1 + Write-Host " Directory does not exist" + } + # Search common locations for claude.exe + $searchPaths = @( + "$env:USERPROFILE\.local\bin\claude.exe", + "$env:LOCALAPPDATA\Programs\claude\claude.exe", + "$env:APPDATA\Claude\claude.exe", + "$env:ProgramFiles\Claude\claude.exe" + ) + $foundPath = $null + foreach ($path in $searchPaths) { + if (Test-Path $path) { + $foundPath = Split-Path $path -Parent + Write-Host "Found claude at: $path" + break + } + } + if ($foundPath) { + Add-Content -Path $env:GITHUB_PATH -Value $foundPath + } else { + # Try to find it anywhere + Write-Host "Searching for claude.exe..." + $found = Get-ChildItem -Path $env:USERPROFILE -Recurse -Filter "claude.exe" -ErrorAction SilentlyContinue | Select-Object -First 1 + if ($found) { + Write-Host "Found claude at: $($found.FullName)" + Add-Content -Path $env:GITHUB_PATH -Value $found.DirectoryName + } else { + Write-Error "Could not find claude.exe anywhere" + exit 1 + } } - Add-Content -Path $env:GITHUB_PATH -Value $claudePath shell: pwsh - name: Verify Claude Code installation @@ -137,13 +166,42 @@ jobs: run: | irm https://claude.ai/install.ps1 | iex $claudePath = "$env:USERPROFILE\.local\bin" - if (Test-Path "$claudePath\claude.exe") { - Write-Host "Claude installed at: $claudePath\claude.exe" + # Debug: show what's in the installation directory + Write-Host "Checking $claudePath..." + if (Test-Path $claudePath) { + Get-ChildItem $claudePath | ForEach-Object { Write-Host " $_" } + } else { + Write-Host " Directory does not exist" + } + # Search common locations for claude.exe + $searchPaths = @( + "$env:USERPROFILE\.local\bin\claude.exe", + "$env:LOCALAPPDATA\Programs\claude\claude.exe", + "$env:APPDATA\Claude\claude.exe", + "$env:ProgramFiles\Claude\claude.exe" + ) + $foundPath = $null + foreach ($path in $searchPaths) { + if (Test-Path $path) { + $foundPath = Split-Path $path -Parent + Write-Host "Found claude at: $path" + break + } + } + if ($foundPath) { + Add-Content -Path $env:GITHUB_PATH -Value $foundPath } else { - Write-Error "Claude executable not found at $claudePath\claude.exe" - exit 1 + # Try to find it anywhere + Write-Host "Searching for claude.exe..." + $found = Get-ChildItem -Path $env:USERPROFILE -Recurse -Filter "claude.exe" -ErrorAction SilentlyContinue | Select-Object -First 1 + if ($found) { + Write-Host "Found claude at: $($found.FullName)" + Add-Content -Path $env:GITHUB_PATH -Value $found.DirectoryName + } else { + Write-Error "Could not find claude.exe anywhere" + exit 1 + } } - Add-Content -Path $env:GITHUB_PATH -Value $claudePath shell: pwsh - name: Verify Claude Code installation From 45770c77c49fa8a4188ad808c982d79b8d17049e Mon Sep 17 00:00:00 2001 From: Ashwin Bhat Date: Tue, 6 Jan 2026 01:35:25 +0530 Subject: [PATCH 3/5] debug: add verbose logging to Windows install step --- .github/workflows/test.yml | 108 +++++++++++++++---------------------- 1 file changed, 44 insertions(+), 64 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5c2f2da..91e1009 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -65,43 +65,33 @@ jobs: if: runner.os == 'Windows' run: | irm https://claude.ai/install.ps1 | iex - $claudePath = "$env:USERPROFILE\.local\bin" - # Debug: show what's in the installation directory - Write-Host "Checking $claudePath..." - if (Test-Path $claudePath) { - Get-ChildItem $claudePath | ForEach-Object { Write-Host " $_" } + + Write-Host "=== Debug: Listing all files under .local ===" + $localDir = "$env:USERPROFILE\.local" + if (Test-Path $localDir) { + Get-ChildItem $localDir -Recurse -ErrorAction SilentlyContinue | ForEach-Object { Write-Host $_.FullName } } else { - Write-Host " Directory does not exist" + Write-Host ".local directory does not exist" } - # Search common locations for claude.exe - $searchPaths = @( - "$env:USERPROFILE\.local\bin\claude.exe", - "$env:LOCALAPPDATA\Programs\claude\claude.exe", - "$env:APPDATA\Claude\claude.exe", - "$env:ProgramFiles\Claude\claude.exe" - ) - $foundPath = $null - foreach ($path in $searchPaths) { - if (Test-Path $path) { - $foundPath = Split-Path $path -Parent - Write-Host "Found claude at: $path" - break - } + + Write-Host "=== Debug: Listing all files under .claude ===" + $claudeDir = "$env:USERPROFILE\.claude" + if (Test-Path $claudeDir) { + Get-ChildItem $claudeDir -Recurse -ErrorAction SilentlyContinue | ForEach-Object { Write-Host $_.FullName } + } else { + Write-Host ".claude directory does not exist" } - if ($foundPath) { - Add-Content -Path $env:GITHUB_PATH -Value $foundPath + + Write-Host "=== Debug: Listing all files under .cache\claude ===" + $cacheDir = "$env:USERPROFILE\.cache\claude" + if (Test-Path $cacheDir) { + Get-ChildItem $cacheDir -Recurse -ErrorAction SilentlyContinue | ForEach-Object { Write-Host $_.FullName } } else { - # Try to find it anywhere - Write-Host "Searching for claude.exe..." - $found = Get-ChildItem -Path $env:USERPROFILE -Recurse -Filter "claude.exe" -ErrorAction SilentlyContinue | Select-Object -First 1 - if ($found) { - Write-Host "Found claude at: $($found.FullName)" - Add-Content -Path $env:GITHUB_PATH -Value $found.DirectoryName - } else { - Write-Error "Could not find claude.exe anywhere" - exit 1 - } + Write-Host ".cache\claude directory does not exist" } + + $claudePath = "$env:USERPROFILE\.local\bin" + Add-Content -Path $env:GITHUB_PATH -Value $claudePath shell: pwsh - name: Verify Claude Code installation @@ -165,43 +155,33 @@ jobs: if: runner.os == 'Windows' run: | irm https://claude.ai/install.ps1 | iex - $claudePath = "$env:USERPROFILE\.local\bin" - # Debug: show what's in the installation directory - Write-Host "Checking $claudePath..." - if (Test-Path $claudePath) { - Get-ChildItem $claudePath | ForEach-Object { Write-Host " $_" } + + Write-Host "=== Debug: Listing all files under .local ===" + $localDir = "$env:USERPROFILE\.local" + if (Test-Path $localDir) { + Get-ChildItem $localDir -Recurse -ErrorAction SilentlyContinue | ForEach-Object { Write-Host $_.FullName } } else { - Write-Host " Directory does not exist" + Write-Host ".local directory does not exist" } - # Search common locations for claude.exe - $searchPaths = @( - "$env:USERPROFILE\.local\bin\claude.exe", - "$env:LOCALAPPDATA\Programs\claude\claude.exe", - "$env:APPDATA\Claude\claude.exe", - "$env:ProgramFiles\Claude\claude.exe" - ) - $foundPath = $null - foreach ($path in $searchPaths) { - if (Test-Path $path) { - $foundPath = Split-Path $path -Parent - Write-Host "Found claude at: $path" - break - } + + Write-Host "=== Debug: Listing all files under .claude ===" + $claudeDir = "$env:USERPROFILE\.claude" + if (Test-Path $claudeDir) { + Get-ChildItem $claudeDir -Recurse -ErrorAction SilentlyContinue | ForEach-Object { Write-Host $_.FullName } + } else { + Write-Host ".claude directory does not exist" } - if ($foundPath) { - Add-Content -Path $env:GITHUB_PATH -Value $foundPath + + Write-Host "=== Debug: Listing all files under .cache\claude ===" + $cacheDir = "$env:USERPROFILE\.cache\claude" + if (Test-Path $cacheDir) { + Get-ChildItem $cacheDir -Recurse -ErrorAction SilentlyContinue | ForEach-Object { Write-Host $_.FullName } } else { - # Try to find it anywhere - Write-Host "Searching for claude.exe..." - $found = Get-ChildItem -Path $env:USERPROFILE -Recurse -Filter "claude.exe" -ErrorAction SilentlyContinue | Select-Object -First 1 - if ($found) { - Write-Host "Found claude at: $($found.FullName)" - Add-Content -Path $env:GITHUB_PATH -Value $found.DirectoryName - } else { - Write-Error "Could not find claude.exe anywhere" - exit 1 - } + Write-Host ".cache\claude directory does not exist" } + + $claudePath = "$env:USERPROFILE\.local\bin" + Add-Content -Path $env:GITHUB_PATH -Value $claudePath shell: pwsh - name: Verify Claude Code installation From 25b2c6608e9973233f741e83411b8db2a35ae9ca Mon Sep 17 00:00:00 2001 From: Ashwin Bhat Date: Tue, 6 Jan 2026 01:47:16 +0530 Subject: [PATCH 4/5] debug: add file sizes and manual copy test --- .github/workflows/test.yml | 54 +++++++++++++++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 91e1009..b6cc3ff 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -66,10 +66,16 @@ jobs: run: | irm https://claude.ai/install.ps1 | iex - Write-Host "=== Debug: Listing all files under .local ===" + Write-Host "=== Debug: Listing all files under .local (with sizes) ===" $localDir = "$env:USERPROFILE\.local" if (Test-Path $localDir) { - Get-ChildItem $localDir -Recurse -ErrorAction SilentlyContinue | ForEach-Object { Write-Host $_.FullName } + Get-ChildItem $localDir -Recurse -ErrorAction SilentlyContinue | ForEach-Object { + if ($_.PSIsContainer) { + Write-Host "[DIR] $($_.FullName)" + } else { + Write-Host "[FILE $($_.Length) bytes] $($_.FullName)" + } + } } else { Write-Host ".local directory does not exist" } @@ -90,6 +96,23 @@ jobs: Write-Host ".cache\claude directory does not exist" } + # Try to manually copy the file and see what error we get + Write-Host "=== Debug: Attempting manual copy ===" + $versionFile = "$env:USERPROFILE\.local\share\claude\versions\2.0.67" + $destFile = "$env:USERPROFILE\.local\bin\claude.exe" + if (Test-Path $versionFile) { + Write-Host "Source exists: $versionFile" + Write-Host "Source size: $((Get-Item $versionFile).Length) bytes" + try { + Copy-Item $versionFile $destFile -Force + Write-Host "Manual copy succeeded!" + } catch { + Write-Host "Manual copy failed: $_" + } + } else { + Write-Host "Source file does not exist: $versionFile" + } + $claudePath = "$env:USERPROFILE\.local\bin" Add-Content -Path $env:GITHUB_PATH -Value $claudePath shell: pwsh @@ -156,10 +179,16 @@ jobs: run: | irm https://claude.ai/install.ps1 | iex - Write-Host "=== Debug: Listing all files under .local ===" + Write-Host "=== Debug: Listing all files under .local (with sizes) ===" $localDir = "$env:USERPROFILE\.local" if (Test-Path $localDir) { - Get-ChildItem $localDir -Recurse -ErrorAction SilentlyContinue | ForEach-Object { Write-Host $_.FullName } + Get-ChildItem $localDir -Recurse -ErrorAction SilentlyContinue | ForEach-Object { + if ($_.PSIsContainer) { + Write-Host "[DIR] $($_.FullName)" + } else { + Write-Host "[FILE $($_.Length) bytes] $($_.FullName)" + } + } } else { Write-Host ".local directory does not exist" } @@ -180,6 +209,23 @@ jobs: Write-Host ".cache\claude directory does not exist" } + # Try to manually copy the file and see what error we get + Write-Host "=== Debug: Attempting manual copy ===" + $versionFile = "$env:USERPROFILE\.local\share\claude\versions\2.0.67" + $destFile = "$env:USERPROFILE\.local\bin\claude.exe" + if (Test-Path $versionFile) { + Write-Host "Source exists: $versionFile" + Write-Host "Source size: $((Get-Item $versionFile).Length) bytes" + try { + Copy-Item $versionFile $destFile -Force + Write-Host "Manual copy succeeded!" + } catch { + Write-Host "Manual copy failed: $_" + } + } else { + Write-Host "Source file does not exist: $versionFile" + } + $claudePath = "$env:USERPROFILE\.local\bin" Add-Content -Path $env:GITHUB_PATH -Value $claudePath shell: pwsh From 1aa8f72c3a8ca365100c7ad36054d81b2ecbea81 Mon Sep 17 00:00:00 2001 From: Ashwin Bhat Date: Tue, 6 Jan 2026 01:56:14 +0530 Subject: [PATCH 5/5] debug: check if .local\bin is a file or directory --- .github/workflows/test.yml | 50 ++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b6cc3ff..13cee0b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -96,21 +96,20 @@ jobs: Write-Host ".cache\claude directory does not exist" } - # Try to manually copy the file and see what error we get - Write-Host "=== Debug: Attempting manual copy ===" - $versionFile = "$env:USERPROFILE\.local\share\claude\versions\2.0.67" - $destFile = "$env:USERPROFILE\.local\bin\claude.exe" - if (Test-Path $versionFile) { - Write-Host "Source exists: $versionFile" - Write-Host "Source size: $((Get-Item $versionFile).Length) bytes" - try { - Copy-Item $versionFile $destFile -Force - Write-Host "Manual copy succeeded!" - } catch { - Write-Host "Manual copy failed: $_" + # Check if .local\bin is a file or directory + Write-Host "=== Debug: Checking .local\bin type ===" + $binPath = "$env:USERPROFILE\.local\bin" + if (Test-Path $binPath) { + $item = Get-Item $binPath + Write-Host "Path exists: $binPath" + Write-Host "Is directory: $($item.PSIsContainer)" + Write-Host "Type: $($item.GetType().Name)" + if (-not $item.PSIsContainer) { + Write-Host "Size: $($item.Length) bytes" + Write-Host "ERROR: .local\bin is a FILE, not a directory!" } } else { - Write-Host "Source file does not exist: $versionFile" + Write-Host ".local\bin does not exist" } $claudePath = "$env:USERPROFILE\.local\bin" @@ -209,21 +208,20 @@ jobs: Write-Host ".cache\claude directory does not exist" } - # Try to manually copy the file and see what error we get - Write-Host "=== Debug: Attempting manual copy ===" - $versionFile = "$env:USERPROFILE\.local\share\claude\versions\2.0.67" - $destFile = "$env:USERPROFILE\.local\bin\claude.exe" - if (Test-Path $versionFile) { - Write-Host "Source exists: $versionFile" - Write-Host "Source size: $((Get-Item $versionFile).Length) bytes" - try { - Copy-Item $versionFile $destFile -Force - Write-Host "Manual copy succeeded!" - } catch { - Write-Host "Manual copy failed: $_" + # Check if .local\bin is a file or directory + Write-Host "=== Debug: Checking .local\bin type ===" + $binPath = "$env:USERPROFILE\.local\bin" + if (Test-Path $binPath) { + $item = Get-Item $binPath + Write-Host "Path exists: $binPath" + Write-Host "Is directory: $($item.PSIsContainer)" + Write-Host "Type: $($item.GetType().Name)" + if (-not $item.PSIsContainer) { + Write-Host "Size: $($item.Length) bytes" + Write-Host "ERROR: .local\bin is a FILE, not a directory!" } } else { - Write-Host "Source file does not exist: $versionFile" + Write-Host ".local\bin does not exist" } $claudePath = "$env:USERPROFILE\.local\bin"