Update StackMonkey.ps1

This commit is contained in:
2025-06-29 03:28:01 -04:00
parent 76777b2826
commit afa652d007

View File

@@ -1485,16 +1485,16 @@ function Start-Server {
#endregion
# Only launch UI if not in silent mode
if (-not $SilentInstall) {
# open browser on whatever port you've set
# Start-Process "microsoft-edge:http://localhost:$Port"
# Only launch the UI if were in the default UI parameter set
if ($PSCmdlet.ParameterSetName -eq 'UI') {
# now that $Port is defined, show it properly:
Write-Host "Starting ScriptMonkey UI on http://localhost:$Port/" -ForegroundColor Cyan
Start-Process "msedge.exe" -ArgumentList "--app=http://localhost:$Port"
# now start your server (this will block until you hit Exit in the UI)
Start-Server
Start-Server # this will block until you hit Exit
return
}
# At the end of ScriptMonkey.ps1
if ($MyInvocation.ExpectingInput) {
Invoke-ScriptMonkey @PSBoundParameters