From fe1dd11269e534dabc849ab06a0fb570d664ea18 Mon Sep 17 00:00:00 2001 From: Snarling <84951833+Snarling@users.noreply.github.com> Date: Fri, 6 May 2022 09:15:48 -0400 Subject: [PATCH] Only mention number of threads if != 1 Fixes confusion mentioned here: https://discord.com/channels/415207508303544321/921120989000114257/971233305020231722 --- src/Terminal/commands/runScript.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Terminal/commands/runScript.ts b/src/Terminal/commands/runScript.ts index eeb9d9bb6..86bff456b 100644 --- a/src/Terminal/commands/runScript.ts +++ b/src/Terminal/commands/runScript.ts @@ -65,11 +65,9 @@ export function runScript( if (ramUsage > ramAvailable + 0.001) { terminal.error( - "This machine does not have enough RAM to run this script with " + - numThreads + - " threads. Script requires " + - numeralWrapper.formatRAM(ramUsage) + - " of RAM", + "This machine does not have enough RAM to run this script" + + (numThreads === 1 ? "" : ` with ${numThreads} threads`) + + `. Script requires ${numeralWrapper.formatRAM(ramUsage)} of RAM`, ); return; }