File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ package config
17
17
18
18
import (
19
19
"encoding/json"
20
- "fmt"
21
20
"os"
22
21
23
22
"github.com/arduino/arduino-cli/commands/daemon"
@@ -26,6 +25,7 @@ import (
26
25
rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1"
27
26
"github.com/sirupsen/logrus"
28
27
"github.com/spf13/cobra"
28
+ "gopkg.in/yaml.v3"
29
29
)
30
30
31
31
func initGetCommand () * cobra.Command {
@@ -77,5 +77,10 @@ func (gr getResult) Data() interface{} {
77
77
}
78
78
79
79
func (gr getResult ) String () string {
80
- return fmt .Sprintf ("%v" , gr .resp )
80
+ gs , err := yaml .Marshal (gr .resp )
81
+ if err != nil {
82
+ // Should never happen
83
+ panic (tr ("unable to marshal config to YAML: %v" , err ))
84
+ }
85
+ return string (gs )
81
86
}
You can’t perform that action at this time.
0 commit comments