correct behavior of profile add to yes flag
This commit is contained in:
@@ -38,10 +38,6 @@ func CobraRunE(cmd *cobra.Command, args []string) (err error) {
|
|||||||
if !SetYes {
|
if !SetYes {
|
||||||
// The checks run twice in the prompt case.
|
// The checks run twice in the prompt case.
|
||||||
// Avoiding putting in a blocking prompt in an API.
|
// Avoiding putting in a blocking prompt in an API.
|
||||||
err = apiprofile.AddProfile(&set, false)
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
_, _, err = apiprofile.ProfileSetParameterCheck(&set, false)
|
_, _, err = apiprofile.ProfileSetParameterCheck(&set, false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
@@ -52,5 +48,5 @@ func CobraRunE(cmd *cobra.Command, args []string) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return apiprofile.ProfileSet(&set)
|
return apiprofile.AddProfile(&set, false)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user