Skip to content

Commit addddfc

Browse files
AnnatarHeclaude
andcommitted
fix(auth): generate YAML config instead of TOML on init
Update auth command to create config.yaml instead of config.toml when initializing shelltime for new users. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 2b7c909 commit addddfc

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

commands/auth.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ import (
1010
"github.com/briandowns/spinner"
1111
"github.com/gookit/color"
1212
"github.com/malamtime/cli/model"
13-
"github.com/pelletier/go-toml/v2"
1413
"github.com/pkg/browser"
1514
"github.com/urfave/cli/v2"
1615
"go.opentelemetry.io/otel/trace"
16+
"gopkg.in/yaml.v3"
1717
)
1818

1919
var AuthCommand *cli.Command = &cli.Command{
@@ -43,9 +43,9 @@ func commandAuth(c *cli.Context) error {
4343
SetupLogger(configDir)
4444

4545
var config model.ShellTimeConfig
46-
configFile := configDir + "/config.toml"
46+
configFile := configDir + "/config.yaml"
4747
if _, err := os.Stat(configFile); os.IsNotExist(err) {
48-
content, err := toml.Marshal(model.DefaultConfig)
48+
content, err := yaml.Marshal(model.DefaultConfig)
4949
if err != nil {
5050
return fmt.Errorf("failed to marshal default config: %w", err)
5151
}
@@ -73,7 +73,7 @@ func commandAuth(c *cli.Context) error {
7373
}
7474

7575
config.Token = newToken
76-
content, err := toml.Marshal(config)
76+
content, err := yaml.Marshal(config)
7777
if err != nil {
7878
return fmt.Errorf("failed to marshal config: %w", err)
7979
}

0 commit comments

Comments
 (0)