From 90a7c2dd0bbfa2fac439ce66ca8ba0a9cf34e490 Mon Sep 17 00:00:00 2001 From: Michael Mason Date: Wed, 11 Dec 2024 12:41:35 -0800 Subject: [PATCH] Persist commands config when commandId is undefined --- packages/gasket-utils/lib/config.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/gasket-utils/lib/config.js b/packages/gasket-utils/lib/config.js index 57c8a75d7..8865eeba7 100644 --- a/packages/gasket-utils/lib/config.js +++ b/packages/gasket-utils/lib/config.js @@ -11,7 +11,6 @@ function applyConfigOverrides( config, { env = '', commandId } ) { - console.log('--------- applyConfigOverrides', { env, commandId }); // @ts-ignore - merged config definitions return deepmerge.all( // @ts-ignore - partial config definitions @@ -28,7 +27,12 @@ function *getPotentialConfigs(config, { env, commandId }) { const { environments = {}, commands = {}, ...baseConfig } = config; const isLocalEnv = env === 'local'; - yield* getCommandOverrides(commands, commandId); + // Keep commands unless a command id is passed + if (commandId) { + yield* getCommandOverrides(commands, commandId); + } else { + baseConfig.commands = commands; + } yield* getSubEnvironmentOverrides(env, environments); yield* getDevOverrides(isLocalEnv, environments); yield baseConfig;