Skip to content

Commit 96b0cf8

Browse files
committed
start docker daemon right away after installation, handle errors
1 parent 917fe13 commit 96b0cf8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,14 @@ if (NBL_WITH_DOCKER)
207207
else()
208208
execute_process(COMMAND powershell -Command "& {
209209
Invoke-WebRequest -Uri https://desktop.docker.com/win/main/amd64/Docker%20Desktop%20Installer.exe -OutFile DockerDesktopInstaller.exe;
210-
Start-Process -FilePath .\\DockerDesktopInstaller.exe -ArgumentList 'install','--quiet','--accept-license','--backend=wsl-2';
210+
$exitCode = Start-Process -Wait -FilePath .\\DockerDesktopInstaller.exe -ArgumentList 'install','--quiet','--accept-license','--backend=wsl-2','--always-run-service';
211211
Remove-Item -Force DockerDesktopInstaller.exe;
212-
}")
212+
exit $exitCode;
213+
}" RESULT_VARIABLE DOCKER_INSTALLER_EXIT_CODE)
214+
215+
if (DOCKER_INSTALLER_EXIT_CODE NOT EQUAL 0)
216+
message(FATAL_ERROR "Docker installer exited with non-zero return code")
217+
endif()
213218
endif()
214219
endif()
215220

0 commit comments

Comments
 (0)