ws.ps1 468 B

123456789
  1. # Thin wrapper. Real logic is tools/ws.py.
  2. param([Parameter(ValueFromRemainingArguments = $true)][string[]]$WsArgs)
  3. $here = Split-Path -Parent $MyInvocation.MyCommand.Path
  4. $py = Get-Command python -ErrorAction SilentlyContinue
  5. if (-not $py) { $py = Get-Command py -ErrorAction SilentlyContinue }
  6. if (-not $py) { Write-Error "需要 Python 3"; exit 2 }
  7. if (-not $WsArgs) { $WsArgs = @("--help") }
  8. & $py.Source (Join-Path $here "tools\ws.py") @WsArgs
  9. exit $LASTEXITCODE