Debug Windows Env #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Debug Windows Env | |
| on: workflow_dispatch | |
| jobs: | |
| debug: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: denoland/setup-deno@v2 | |
| with: | |
| deno-version: v2.7.5 | |
| - name: Debug PowerShell Env | |
| shell: pwsh | |
| run: | | |
| echo "=== PowerShell Environment ===" | |
| Get-ChildItem env: | Format-Table -AutoSize | |
| echo "" | |
| echo "=== Critical Windows Vars ===" | |
| echo "COMSPEC: $env:COMSPEC" | |
| echo "SystemRoot: $env:SystemRoot" | |
| echo "windir: $env:windir" | |
| echo "PATH: $env:PATH" | |
| - name: Debug Deno Process Env | |
| shell: pwsh | |
| run: | | |
| deno eval " | |
| const process = await import('node:process'); | |
| console.log('=== Deno node:process.env ==='); | |
| console.log('COMSPEC:', process.env.COMSPEC || 'UNDEFINED'); | |
| console.log('SystemRoot:', process.env.SystemRoot || 'UNDEFINED'); | |
| console.log('windir:', process.env.windir || 'UNDEFINED'); | |
| console.log('PATH exists:', !!process.env.PATH); | |
| console.log('Platform:', process.platform); | |
| console.log('All env keys:', Object.keys(process.env).filter(k => k.includes('COM') || k.includes('ROOT') || k.includes('WINDIR')).join(', ')); | |
| " | |
| - name: Test Spawn | |
| shell: pwsh | |
| run: | | |
| deno eval " | |
| import { spawn } from 'node:child_process'; | |
| import process from 'node:process'; | |
| console.log('Testing spawn with shell:true...'); | |
| try { | |
| const child = spawn('echo', ['hello'], { shell: true }); | |
| console.log('Spawn succeeded, PID:', child.pid); | |
| child.on('error', (e) => console.log('Error:', e.message)); | |
| child.on('close', (code) => console.log('Exit code:', code)); | |
| } catch (e) { | |
| console.log('Spawn failed:', e.message); | |
| } | |
| " |