Files
md-preview/agent/tests/ui-smoke.cmd
Richard Wu 2fc3f740ca test: add a bypass wrapper for the UI smoke script
Windows PowerShell with an AllSigned policy refuses unsigned .ps1 files.
ui-smoke.cmd runs ui-smoke.ps1 with a process-scoped -ExecutionPolicy Bypass
(no system policy change) and keeps the window open when double-clicked.
2026-11-04 17:12:32 +08:00

12 lines
519 B
Batchfile

@echo off
setlocal
rem Double-clickable wrapper: Windows PowerShell may refuse unsigned .ps1 files
rem (AllSigned policy). This runs the script with a process-scoped Bypass.
set "SCRIPT=%~dp0ui-smoke.ps1"
"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -ExecutionPolicy Bypass -File "%SCRIPT%" %*
set "CODE=%ERRORLEVEL%"
if not "%CODE%"=="0" echo.&echo UI smoke exited with code %CODE%.
rem Keep the window open when launched without arguments (double-click).
if "%~1"=="" pause
exit /b %CODE%