From b24ab492e43dac87913da5b74ffeae617fd6b204 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Thu, 14 May 2020 13:59:46 -0400 Subject: [PATCH] Micro optimization --- .../Components/StaticFiles/Configuration.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Host/Components/StaticFiles/Configuration.cs b/src/Tgstation.Server.Host/Components/StaticFiles/Configuration.cs index bc9450b40d..17ebbe5a5e 100644 --- a/src/Tgstation.Server.Host/Components/StaticFiles/Configuration.cs +++ b/src/Tgstation.Server.Host/Components/StaticFiles/Configuration.cs @@ -467,8 +467,8 @@ namespace Tgstation.Server.Host.Components.StaticFiles using (cancellationToken.Register(() => script.Terminate())) { var exitCode = await script.Lifetime.ConfigureAwait(false); - var scriptOutput = script.GetCombinedOutput(); cancellationToken.ThrowIfCancellationRequested(); + var scriptOutput = script.GetCombinedOutput(); if (exitCode != 0) throw new JobException($"Script {I} exited with code {exitCode}:{Environment.NewLine}{scriptOutput}"); }