Skip to content

Commit 99c8c88

Browse files
committed
Rename 'profile init' -> 'profile create'
1 parent d432466 commit 99c8c88

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed
File renamed without changes.

internal/cli/profile/profile_init.go renamed to internal/cli/profile/profile_create.go

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,26 +32,25 @@ func initProfileCreateCommand(srv rpc.ArduinoCoreServiceServer) *cobra.Command {
3232
var setAsDefault bool
3333
var fqbnArg arguments.Fqbn
3434
var profileArg arguments.Profile
35-
initCommand := &cobra.Command{
36-
Use: "init",
37-
Short: i18n.Tr("Create or update the sketch project file."),
38-
Long: i18n.Tr("Create or update the sketch project file."),
35+
createCommand := &cobra.Command{
36+
Use: "create",
37+
Short: i18n.Tr("Create or update a profile in the sketch project file."),
3938
Example: "" +
4039
" # " + i18n.Tr("Creates or updates the sketch project file in the current directory.") + "\n" +
41-
" " + os.Args[0] + " profile init\n" +
42-
" " + os.Args[0] + " profile init --profile uno_profile -b arduino:avr:uno",
40+
" " + os.Args[0] + " profile create\n" +
41+
" " + os.Args[0] + " profile create --profile uno_profile -b arduino:avr:uno",
4342
Args: cobra.MaximumNArgs(1),
4443
Run: func(cmd *cobra.Command, args []string) {
45-
runInitCommand(cmd.Context(), args, srv, profileArg.Get(), fqbnArg.String(), setAsDefault)
44+
runProfileCreateCommand(cmd.Context(), args, srv, profileArg.Get(), fqbnArg.String(), setAsDefault)
4645
},
4746
}
48-
fqbnArg.AddToCommand(initCommand, srv)
49-
profileArg.AddToCommand(initCommand, srv)
50-
initCommand.Flags().BoolVar(&setAsDefault, "set-default", false, i18n.Tr("Set the profile as the default one."))
51-
return initCommand
47+
fqbnArg.AddToCommand(createCommand, srv)
48+
profileArg.AddToCommand(createCommand, srv)
49+
createCommand.Flags().BoolVar(&setAsDefault, "set-default", false, i18n.Tr("Set the profile as the default one."))
50+
return createCommand
5251
}
5352

54-
func runInitCommand(ctx context.Context, args []string, srv rpc.ArduinoCoreServiceServer, profile, fqbn string, setAsDefault bool) {
53+
func runProfileCreateCommand(ctx context.Context, args []string, srv rpc.ArduinoCoreServiceServer, profile, fqbn string, setAsDefault bool) {
5554
path := ""
5655
if len(args) > 0 {
5756
path = args[0]

0 commit comments

Comments
 (0)