diff --git a/cookbook/src/commands/regenerate.ts b/cookbook/src/commands/regenerate.ts index efaed1753d..4c18195933 100644 --- a/cookbook/src/commands/regenerate.ts +++ b/cookbook/src/commands/regenerate.ts @@ -2,7 +2,6 @@ import {execSync} from 'child_process'; import {CommandModule} from 'yargs'; import {applyRecipe} from '../lib/apply'; import {FILES_TO_IGNORE_FOR_GENERATE, TEMPLATE_PATH} from '../lib/constants'; -import {withResolvedCatalog} from '../lib/workspace'; import {generateRecipe} from '../lib/generate'; import {isRenderFormat, RENDER_FORMATS, renderRecipe} from '../lib/render'; import {listRecipes, separator, RecipeManifestFormat} from '../lib/util'; @@ -71,24 +70,19 @@ async function handler(args: RegenerateArgs) { for await (const recipe of recipes) { console.log(`🔄 Regenerating recipe '${recipe}'`); - // resolve catalog/workspace protocols, apply recipe, then restore - await withResolvedCatalog(async () => { - applyRecipe({ - recipeTitle: recipe, - }); - // generate the recipe - await generateRecipe({ - recipeName: recipe, - onlyFiles: args.onlyFiles, - filenamesToIgnore: FILES_TO_IGNORE_FOR_GENERATE, - referenceBranch: args.referenceBranch, - recipeManifestFormat: args.recipeManifestFormat, - }); - // render the recipe - renderRecipe({ - recipeName: recipe, - format, - }); + applyRecipe({ + recipeTitle: recipe, + }); + await generateRecipe({ + recipeName: recipe, + onlyFiles: args.onlyFiles, + filenamesToIgnore: FILES_TO_IGNORE_FOR_GENERATE, + referenceBranch: args.referenceBranch, + recipeManifestFormat: args.recipeManifestFormat, + }); + renderRecipe({ + recipeName: recipe, + format, }); // clean up the skeleton template directory execSync(`git checkout -- ${TEMPLATE_PATH}`);