Skip to content

Commit f66a398

Browse files
committed
Slightly refactored 'lib list' command call
1 parent 28989a6 commit f66a398

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

Diff for: internal/cli/lib/list.go

+3-7
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ not listed, they can be listed by adding the --all flag.`),
4545
Example: " " + os.Args[0] + " lib list",
4646
Args: cobra.MaximumNArgs(1),
4747
Run: func(cmd *cobra.Command, args []string) {
48-
runListCommand(args, all, updatable)
48+
instance := instance.CreateAndInit()
49+
logrus.Info("Executing `arduino-cli lib list`")
50+
List(instance, args, all, updatable)
4951
},
5052
}
5153
listCommand.Flags().BoolVar(&all, "all", false, tr("Include built-in libraries (from platforms and IDE) in listing."))
@@ -54,12 +56,6 @@ not listed, they can be listed by adding the --all flag.`),
5456
return listCommand
5557
}
5658

57-
func runListCommand(args []string, all bool, updatable bool) {
58-
instance := instance.CreateAndInit()
59-
logrus.Info("Executing `arduino-cli lib list`")
60-
List(instance, args, all, updatable)
61-
}
62-
6359
// List gets and prints a list of installed libraries.
6460
func List(instance *rpc.Instance, args []string, all bool, updatable bool) {
6561
installedLibs := GetList(instance, args, all, updatable)

0 commit comments

Comments
 (0)