diff --git a/src/Command/CommandTrait.php b/src/Command/CommandTrait.php index ed807636..58566c16 100644 --- a/src/Command/CommandTrait.php +++ b/src/Command/CommandTrait.php @@ -19,6 +19,10 @@ trait CommandTrait */ public function loadConfig(string $config = 'swagger_bake'): void { + if ($config !== 'swagger_bake') { + Configure::delete('SwaggerBake'); + } + if (!Configure::load($config, 'default')) { throw new SwaggerBakeRunTimeException( "SwaggerBake configuration file `$config` is missing"