add passphrase flag (#4518)
<!-- PR description--> add `--new-passphrase` flag for `update-passphrase` command #### Does this PR need a docs update or release note? - [ ] ✅ Yes, it's included - [ ] 🕐 Yes, but in a later PR - [ ] ⛔ No #### Type of change <!--- Please check the type of change your PR introduces: ---> - [ ] 🤖 Supportability/Tests #### Issue(s) <!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. --> * #<issue> #### Test Plan <!-- How will this be tested prior to merging.--> - [ ] 💪 Manual - [ ] ⚡ Unit test - [ ] 💚 E2E
This commit is contained in:
parent
02b8a77bdd
commit
b4d14cb83f
@ -76,12 +76,16 @@ func AddCorsoPassphaseFlags(cmd *cobra.Command) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// M365 flags
|
// M365 flags
|
||||||
func AddCorsoUpdatePassphraseFlags(cmd *cobra.Command) {
|
func AddUpdatePassphraseFlags(cmd *cobra.Command, require bool) {
|
||||||
fs := cmd.Flags()
|
fs := cmd.Flags()
|
||||||
fs.StringVar(&NewPhasephraseFV,
|
fs.StringVar(&NewPhasephraseFV,
|
||||||
NewPassphraseFN,
|
NewPassphraseFN,
|
||||||
"",
|
"",
|
||||||
"update Corso passphrase for repo")
|
"update Corso passphrase for repo")
|
||||||
|
|
||||||
|
if require {
|
||||||
|
cobra.CheckErr(cmd.MarkFlagRequired(NewPassphraseFN))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|||||||
@ -61,6 +61,8 @@ func AddCommands(cmd *cobra.Command) {
|
|||||||
flags.AddMaintenanceUserFlag(maintenanceCmd)
|
flags.AddMaintenanceUserFlag(maintenanceCmd)
|
||||||
flags.AddMaintenanceHostnameFlag(maintenanceCmd)
|
flags.AddMaintenanceHostnameFlag(maintenanceCmd)
|
||||||
|
|
||||||
|
flags.AddUpdatePassphraseFlags(updatePassphraseCmd, true)
|
||||||
|
|
||||||
for _, addRepoTo := range repoCommands {
|
for _, addRepoTo := range repoCommands {
|
||||||
addRepoTo(initCmd)
|
addRepoTo(initCmd)
|
||||||
addRepoTo(connectCmd)
|
addRepoTo(connectCmd)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user