Skip to content

Commit e394b76

Browse files
committed
remove double CreateAndInit()
1 parent 1a94fdf commit e394b76

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cli/board/list.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,12 @@ func initListCommand() *cobra.Command {
5656

5757
// runListCommand detects and lists the connected arduino boards
5858
func runListCommand(cmd *cobra.Command, args []string) {
59+
inst := instance.CreateAndInit()
5960
if watch {
60-
inst := instance.CreateAndInit()
6161
watchList(cmd, inst)
6262
os.Exit(0)
6363
}
6464

65-
inst := instance.CreateAndInit()
6665
ports, err := board.List(&rpc.BoardListRequest{
6766
Instance: inst,
6867
Timeout: timeout.Milliseconds(),

0 commit comments

Comments
 (0)