forked from MobiusQuant/OpenMobius-skill
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.ps1
More file actions
26 lines (23 loc) · 739 Bytes
/
Copy pathinstall.ps1
File metadata and controls
26 lines (23 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env pwsh
# Thin wrapper for install.py — Windows PowerShell.
$ErrorActionPreference = 'Stop'
$DIR = Split-Path -Parent $MyInvocation.MyCommand.Path
# Prefer 'py -3' (Python launcher); fallback to 'python'
$pyCmd = $null
foreach ($cand in @('py', 'python', 'python3')) {
if (Get-Command $cand -ErrorAction SilentlyContinue) {
$pyCmd = $cand
break
}
}
if (-not $pyCmd) {
Write-Host "Error: Python 3.10+ not found. Install from:" -ForegroundColor Red
Write-Host " https://www.python.org/downloads/ (check 'Add Python to PATH')" -ForegroundColor Yellow
exit 1
}
if ($pyCmd -eq 'py') {
& py -3 "$DIR\install.py" @args
} else {
& $pyCmd "$DIR\install.py" @args
}
exit $LASTEXITCODE