Skip to content

Commit

Permalink
Only update run count when user is not already a stargazer
Browse files Browse the repository at this point in the history
Checking the file into Git, don't want it to change on its own.

commit-id:7aa48ec5
  • Loading branch information
leoluk committed Dec 18, 2021
1 parent 9734851 commit a163fea
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ func ParseConfig(gitcmd git.GitInterface) *Config {
rake.YamlFileSource(UserConfigFilePath()),
)

cfg.User.RunCount = cfg.User.RunCount + 1
if !cfg.User.Stargazer {
cfg.User.RunCount = cfg.User.RunCount + 1
}

rake.LoadSources(cfg.User,
rake.YamlFileWriter(UserConfigFilePath()))

Expand Down

0 comments on commit a163fea

Please sign in to comment.