Only mention number of threads if != 1

Fixes confusion mentioned here: https://discord.com/channels/415207508303544321/921120989000114257/971233305020231722
This commit is contained in:
Snarling 2022-05-06 09:15:48 -04:00
parent 99a0337a14
commit fe1dd11269

@ -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;
}