From 54d979c7ec8c9cd467cdebd644de862f613a2117 Mon Sep 17 00:00:00 2001 From: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Date: Mon, 16 Sep 2024 12:36:16 -0700 Subject: [PATCH] chore: pass turbo remote cache options in environment variables (#6479) --- scripts/turbo/index.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/scripts/turbo/index.js b/scripts/turbo/index.js index 7747fc2a04be..a4f8b3c54b5f 100644 --- a/scripts/turbo/index.js +++ b/scripts/turbo/index.js @@ -3,15 +3,7 @@ const { spawnProcess } = require("../utils/spawn-process"); const path = require("path"); const runTurbo = async (task, args, apiSecret, apiEndpoint) => { - let command = ["turbo", "run", task]; - if (apiSecret && apiEndpoint) { - command = command.concat([ - `--api=${apiEndpoint}`, - "--team=aws-sdk-js", - `--token=${apiSecret}`, - "--concurrency=100%", - ]); - } + let command = ["turbo", "run", task, "--concurrency=100%"]; command = command.concat(args); const turboRoot = path.join(__dirname, "..", ".."); try { @@ -21,6 +13,12 @@ const runTurbo = async (task, args, apiSecret, apiEndpoint) => { env: { ...process.env, TURBO_TELEMETRY_DISABLED: "1", + ...(apiSecret && + apiEndpoint && { + TURBO_API: apiEndpoint, + TURBO_TOKEN: apiSecret, + TURBO_TEAM: "aws-sdk-js", + }), }, }); } catch (error) {