Removed --overwrite flag.

This commit is contained in:
2025-08-03 12:02:47 +02:00
parent 6e69377d1a
commit 45dfdf0afc
2 changed files with 6 additions and 13 deletions

View File

@@ -8,7 +8,6 @@ import (
)
// Global flags available to all commands
var overwrite bool
var dryRun bool
var verbose bool
@@ -46,7 +45,6 @@ func main() {
}
// Define persistent flags (global for all commands)
rootCmd.PersistentFlags().BoolVar(&overwrite, "overwrite", false, "Allow overwriting existing files")
rootCmd.PersistentFlags().BoolVar(&verbose, "verbose", false, "Print detailed information about each processed certificate")
rootCmd.PersistentFlags().BoolVar(&dryRun, "dry-run", false, "Validate and show what would be created, but do not write files (batch mode)")
rootCmd.PersistentFlags().StringVar(&caConfigPath, "config", "ca_config.hcl", "Path to CA configuration file")
@@ -95,7 +93,7 @@ func main() {
Type: certType,
Validity: validity,
SAN: san,
}, overwrite, dryRun, verbose)
})
if err != nil {
fmt.Fprintf(os.Stderr, "ERROR: %v\n", err)
@@ -120,7 +118,7 @@ func main() {
Short: "Provision certificates from a batch file (HCL)",
Run: func(cmd *cobra.Command, args []string) {
err := ProvisionCertificates(provisionFile, overwrite, false, verbose)
err := ProvisionCertificates(provisionFile)
if err != nil {
fmt.Fprintf(os.Stderr, "ERROR: %v\n", err)