This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
# Windows 录制入口(无需 bash/WSL)
# Usage:
# npm run record:priority1
# powershell -ExecutionPolicy Bypass -File scripts/record-priority1.ps1
# powershell -ExecutionPolicy Bypass -File scripts/record-priority1.ps1 -StartUrl "https://www.priority1.com/"
param(
[string]$StartUrl
)
$ErrorActionPreference = "Stop"
$Root = Split-Path -Parent $PSScriptRoot
Push-Location $Root
try {
if ($StartUrl) {
npm run record:priority1 -- $StartUrl
}
else {
npm run record:priority1
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
finally {
Pop-Location