refactored overlay class

overlay.GetOverlay(name) returns now an error if the overlay doesn't
exist. This is the most canonical way to act if there is no overlay.
This commit is contained in:
Christian Goll
2025-08-04 15:18:51 +02:00
committed by Jonathon Anderson
parent c17fe8d512
commit 6f4fd60d8f
32 changed files with 1105 additions and 437 deletions

View File

@@ -24,15 +24,13 @@ var (
}
},
}
OverwriteFile bool
NoOverlayUpdate bool
CreateDirs bool
Workers int
OverwriteFile bool
CreateDirs bool
Workers int
)
func init() {
baseCmd.PersistentFlags().BoolVarP(&OverwriteFile, "overwrite", "o", false, "Overwrite file if exists")
baseCmd.PersistentFlags().BoolVarP(&NoOverlayUpdate, "noupdate", "n", false, "Don't update overlays")
baseCmd.PersistentFlags().BoolVarP(&CreateDirs, "parents", "p", false, "Create any necessary parent directories")
baseCmd.PersistentFlags().IntVar(&Workers, "workers", 0, "The number of parallel workers building overlays (<=0 indicates 1 worker per CPU)")
}