From fa4d85818ddf14abc7e1eee4692a5c0ad0403b6d Mon Sep 17 00:00:00 2001 From: "Kamat, Trivikram" <16024985+trivikr@users.noreply.github.com> Date: Mon, 16 Sep 2024 17:23:21 +0000 Subject: [PATCH] chore: pass turbo API and TOKEN in environment variables --- 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) {