Skip to content

Commit

Permalink
fix: Clean non-API-specific files when configuring a new API
Browse files Browse the repository at this point in the history
  • Loading branch information
jskeet committed Dec 16, 2024
1 parent 0bd0af7 commit 7089dbe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/command/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,10 @@ var CmdConfigure = &Command{
if err := container.Generate(ctx, image, apiRoot, outputDir, generatorInput, flagAPIPath); err != nil {
return err
}
// No need to clean here, as configure should fail for an existing API.
// We don't need to clean the newly-configured API, but we *do* need to clean any non-API-specific files.
if err := container.Clean(ctx, image, languageRepo.Dir, "none"); err != nil {
return err
}
if err := os.CopyFS(languageRepo.Dir, os.DirFS(outputDir)); err != nil {
return err
}
Expand Down

0 comments on commit 7089dbe

Please sign in to comment.