$password = $null # Manually parse arguments for a "-p" flag for ($i = 0; $i -lt $args.Count; $i++) { if ($args[$i] -eq "-p" -and $args.Count -gt $i + 1) { $password = $args[$i + 1] break } } # Check if we got a value for our environment variable if ($null -ne $password) { $Env:DB_PASSWORD = $password } # Run the app in the web dir. Set-Location -Path ./src/Web dotnet watch run