Use wwctl container import --password by default

Retains support for --passwd as a hidden flag targeting the same
variable.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2024-09-04 16:46:28 -06:00
parent 56ce095a48
commit 9e0f255fe3
2 changed files with 4 additions and 2 deletions

View File

@@ -47,7 +47,9 @@ func init() {
baseCmd.PersistentFlags().BoolVar(&SyncUser, "syncuser", false, "Synchronize UIDs/GIDs from host to container")
baseCmd.PersistentFlags().BoolVar(&OciNoHttps, "nohttps", false, "Ignore wrong TLS certificates, superseedes env WAREWULF_OCI_NOHTTPS")
baseCmd.PersistentFlags().StringVar(&OciUsername, "username", "", "Set username for the access to the registry, superseedes env WAREWULF_OCI_USERNAME")
baseCmd.PersistentFlags().StringVar(&OciPassword, "password", "", "Set password for the access to the registry, superseedes env WAREWULF_OCI_PASSWORD")
baseCmd.PersistentFlags().StringVar(&OciPassword, "passwd", "", "Set password for the access to the registry, superseedes env WAREWULF_OCI_PASSWORD")
_ = baseCmd.PersistentFlags().MarkHidden("passwd")
}
// GetRootCommand returns the root cobra.Command for the application.