mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
ci: explicitly use python3 to start goma (#39650)
* ci: explicitly use python3 to start goma
* ci: explicitly use python3 for goma
(cherry picked from commit 83760bd5c6)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
11 lines
555 B
PowerShell
Executable File
11 lines
555 B
PowerShell
Executable File
param([string]$gomaDir=$PWD)
|
|
$cmdPath = Join-Path -Path $gomaDir -ChildPath "goma_ctl.py"
|
|
Start-Process -FilePath cmd -ArgumentList "/C", "python3", "$cmdPath", "ensure_start"
|
|
$timedOut = $false; $waitTime = 0; $waitIncrement = 5; $timeout=120;
|
|
Do { sleep $waitIncrement; $timedOut = (($waitTime+=$waitIncrement) -gt $timeout); iex "$gomaDir\gomacc.exe port 2" > $null; } Until(($LASTEXITCODE -eq 0) -or $timedOut)
|
|
if ($timedOut) {
|
|
write-error 'Timed out waiting for goma to start'; exit 1;
|
|
} else {
|
|
Write-Output "Successfully started goma!"
|
|
}
|