Skip to content

Commit 99c3912

Browse files
committed
task: add config confirmation message
1 parent 2267521 commit 99c3912

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

internal/cli/config/config.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
package config
1616

1717
import (
18+
"fmt"
19+
1820
"github.com/AlecAivazis/survey/v2"
1921
"github.com/mongodb/mongocli/internal/cli"
2022
"github.com/mongodb/mongocli/internal/config"
@@ -117,7 +119,16 @@ func (opts *configOpts) Run() error {
117119
return err
118120
}
119121

120-
return opts.Save()
122+
if err := opts.Save(); err != nil {
123+
return err
124+
}
125+
126+
fmt.Printf("%s is all set now\n", config.ToolName)
127+
fmt.Printf("You can use [%s config set] to change more settings. \n", config.ToolName)
128+
if config.Name() != config.DefaultProfile {
129+
fmt.Printf("To use this profile remember to set the flag [-%s %s]\n", flag.ProfileShort, config.Name())
130+
}
131+
return nil
121132
}
122133

123134
func Builder() *cobra.Command {

0 commit comments

Comments
 (0)