prune empty directories

This commit is contained in:
Michael Yang
2023-09-26 17:28:14 -07:00
parent a2b210130f
commit 8608eb4760
3 changed files with 54 additions and 0 deletions

View File

@@ -721,6 +721,15 @@ func RunServer(cmd *cobra.Command, _ []string) error {
if err := server.PruneLayers(); err != nil {
return err
}
manifestsPath, err := server.GetManifestPath()
if err != nil {
return err
}
if err := server.PruneDirectory(manifestsPath); err != nil {
return err
}
}
return server.Serve(ln, origins)