Skip to content

Commit 480bc30

Browse files
committed
z
1 parent 5788f13 commit 480bc30

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/actions/setup-imdisk/action.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,14 @@ runs:
2222
if ((Get-FileHash $path -Algorithm SHA256).Hash -ne $env:OSFMOUNT_SHA256) {
2323
throw "Failed to verify osfmount.exe"
2424
}
25-
Start-Process -FilePath $path -ArgumentList "/silent /norestart" -Wait
25+
# We can't just use -Wait here or it will block when the installer
26+
# launches the GUI afterwards, and there's no way to turn that off.
27+
$proc = Start-Process -FilePath $path -ArgumentList "/silent /norestart" -PassThru
28+
$proc.WaitForExit()
29+
if ($proc.ExitCode -ne 0) { throw "Failed to install osfmount.exe" }
30+
# Close the GUI and delete the installer.
31+
Get-Process -Name "OSFMount" -ErrorAction SilentlyContinue | Stop-Process -Force
32+
Remove-Item $path
2633
env:
2734
OSFMOUNT_URL: https://storage.googleapis.com/coder-osfmount-binaries/osfmount-v3.1.1003.exe
2835
OSFMOUNT_SHA256: 9fe0738b7c2d29a7414e67f53aea359f3801d1c37b44f1b4fed5d02cb7536369

0 commit comments

Comments
 (0)