Skip to content

Commit

Permalink
Persist commands config when commandId is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
mmason2-godaddy authored and agerard-godaddy committed Dec 11, 2024
1 parent 2ae13aa commit 90a7c2d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/gasket-utils/lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down

0 comments on commit 90a7c2d

Please sign in to comment.