From 68910d0cf2e2bfc4a5597192832cbe6344d70e2b Mon Sep 17 00:00:00 2001 From: Markus Keil Date: Mon, 7 Oct 2024 16:06:37 +0200 Subject: [PATCH] fix compile error --- CloudController.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CloudController.cs b/CloudController.cs index 65f6c02..c36da10 100644 --- a/CloudController.cs +++ b/CloudController.cs @@ -145,7 +145,7 @@ public async Task CreateNewRunner(string arch, string size, string runn .AppendLine(" - [ sh, -xc, 'bash /data/provision.sh']") .ToString(); - Server newSrv; + Server newSrv = null; bool success = false; List dataCenters = [ @@ -184,6 +184,11 @@ public async Task CreateNewRunner(string arch, string size, string runn } + if (newSrv == null) + { + throw new Exception("Unable to spin up VM for " + name); + } + return new Machine { Id = newSrv.Id,