-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_env.ps1
More file actions
26 lines (23 loc) · 865 Bytes
/
Copy pathsetup_env.ps1
File metadata and controls
26 lines (23 loc) · 865 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
# setup_env.ps1 - Environment Verification
Write-Host "Verifying Scripted System Runtime Environment..." -ForegroundColor Cyan
$checks = @{
"Lua" = "lua -v"
"Python" = "python --version"
"Ruby" = "ruby -v"
"Bash" = "bash --version"
}
foreach ($tool in $checks.Keys) {
try {
$cmd = $checks[$tool]
# redirect stderr to null to avoid ugly errors in console if missing
Invoke-Expression "$cmd 2>&1" | Out-Null
if ($LASTEXITCODE -eq 0) {
Write-Host "[$tool] Found." -ForegroundColor Green
} else {
Write-Host "[$tool] NOT FOUND (Exit Code $LASTEXITCODE). Some features may be disabled." -ForegroundColor Yellow
}
} catch {
Write-Host "[$tool] NOT FOUND. Some features may be disabled." -ForegroundColor Yellow
}
}
Write-Host "`nEnvironment Check Complete."