@@ -25,6 +25,7 @@ import (
2525 "github.com/arduino/arduino-cli/cli/errorcodes"
2626 "github.com/arduino/arduino-cli/cli/feedback"
2727 "github.com/arduino/arduino-cloud-cli/command/dashboard"
28+ "github.com/arduino/arduino-cloud-cli/internal/config"
2829 "github.com/sirupsen/logrus"
2930 "github.com/spf13/cobra"
3031)
@@ -56,6 +57,12 @@ func initCreateCommand() *cobra.Command {
5657func runCreateCommand (cmd * cobra.Command , args []string ) {
5758 logrus .Infof ("Creating dashboard from template %s" , createFlags .template )
5859
60+ cred , err := config .RetrieveCredentials ()
61+ if err != nil {
62+ feedback .Errorf ("Error during dashboard create: retrieving credentials: %w" , err )
63+ os .Exit (errorcodes .ErrGeneric )
64+ }
65+
5966 params := & dashboard.CreateParams {
6067 Template : createFlags .template ,
6168 Override : createFlags .override ,
@@ -64,7 +71,7 @@ func runCreateCommand(cmd *cobra.Command, args []string) {
6471 params .Name = & createFlags .name
6572 }
6673
67- dashboard , err := dashboard .Create (params )
74+ dashboard , err := dashboard .Create (params , cred )
6875 if err != nil {
6976 feedback .Errorf ("Error during dashboard create: %v" , err )
7077 os .Exit (errorcodes .ErrGeneric )
0 commit comments