Skip to content

Commit ed65fda

Browse files
authored
chore : fix the prefilled field when flag value is passed (#215)
Signed-off-by: Harkirat Singh <[email protected]>
1 parent c52f5a9 commit ed65fda

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pkg/cmd/profile/add.go

+2-4
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@ var profileAddCmd = &cobra.Command{
3030

3131
if profileAddView.ProfileName != "" && profileAddView.ApiUrl != "" {
3232
_, err = addProfile(profileAddView, c, true)
33-
}
34-
35-
if profileNameFlag == "" || apiUrlFlag == "" {
36-
_, err = CreateProfile(c, nil, true)
33+
} else {
34+
_, err = CreateProfile(c, &profileAddView, true)
3735
}
3836

3937
if err != nil {

0 commit comments

Comments
 (0)