Skip to content

Commit a3f00e0

Browse files
committed
fix: add detailed error capture for Windows cjbind test
Enhance Windows test step to capture and display DLL-related errors that might be silently failing. This includes: - File existence verification - Explicit error output capture (stderr) - Exception handling with detailed error messages - Optional dumpbin dependency check
1 parent 0106ac7 commit a3f00e0

1 file changed

Lines changed: 35 additions & 1 deletion

File tree

.github/workflows/test.yml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,40 @@ jobs:
5151
env:
5252
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5353

54-
- name: Test cjbind
54+
- name: Test cjbind (Windows - with error capture)
55+
if: matrix.os.sys == 'windows'
56+
run: |
57+
Write-Host "Testing cjbind installation..."
58+
Write-Host "Executable path: $env:USERPROFILE\.cjpm\bin\cjbind.exe"
59+
60+
# Check if file exists
61+
if (Test-Path "$env:USERPROFILE\.cjpm\bin\cjbind.exe") {
62+
Write-Host "File exists, size: $((Get-Item "$env:USERPROFILE\.cjpm\bin\cjbind.exe").Length) bytes"
63+
} else {
64+
Write-Host "ERROR: File not found!"
65+
exit 1
66+
}
67+
68+
# Try to run with error capture
69+
try {
70+
$output = & cjbind --version 2>&1
71+
Write-Host "Output: $output"
72+
if ($LASTEXITCODE -ne 0) {
73+
Write-Host "ERROR: Exit code $LASTEXITCODE"
74+
Write-Host "Checking dependencies with dumpbin..."
75+
if (Get-Command dumpbin -ErrorAction SilentlyContinue) {
76+
dumpbin /dependents "$env:USERPROFILE\.cjpm\bin\cjbind.exe"
77+
}
78+
exit $LASTEXITCODE
79+
}
80+
} catch {
81+
Write-Host "EXCEPTION: $_"
82+
Write-Host "Exception Type: $($_.Exception.GetType().FullName)"
83+
Write-Host "Exception Message: $($_.Exception.Message)"
84+
exit 1
85+
}
86+
87+
- name: Test cjbind (Unix)
88+
if: matrix.os.sys != 'windows'
5589
run: |
5690
cjbind --version

0 commit comments

Comments
 (0)