Update samy.ps1

This commit is contained in:
2025-12-09 23:19:07 -05:00
parent 77c67bb00f
commit 5fce509677

View File

@@ -111,17 +111,18 @@ function Import-SamyModule {
$resp = Invoke-WebRequest -Uri $url -UseBasicParsing -ErrorAction Stop
$content = $resp.Content
if (-not $content) {
Write-Host "[Error] Module $Name from $url returned empty content." -ForegroundColor Red
Write-Host ("[Error] Module {0} from {1} returned empty content." -f $Name, $url) -ForegroundColor Red
throw "Empty module content."
}
Invoke-Expression $content
}
catch {
Write-Host "[Error] Failed to load module $Name from $url: $($_.Exception.Message)" -ForegroundColor Red
Write-Host ("[Error] Failed to load module {0} from {1}: {2}" -f $Name, $url, $_.Exception.Message) -ForegroundColor Red
throw
}
}
# Load subsystems in a predictable order
Import-SamyModule -Name 'Samy.Logging.ps1' # Write-LogHelper, Write-LogHybrid
Import-SamyModule -Name 'Samy.SVSBootstrap.ps1' # Install-SVSMSP, cleanup, NuGet bootstrap