mirror of
https://codeberg.org/scip/epuppy.git
synced 2026-02-04 09:40:57 +01:00
fix #2: add --create-config to create a default config file
This commit is contained in:
10
cmd/root.go
10
cmd/root.go
@@ -52,6 +52,16 @@ func Execute(output io.Writer) int {
|
||||
return 0
|
||||
}
|
||||
|
||||
if conf.CreateConfig {
|
||||
msg, err := conf.WriteConfigFile()
|
||||
if err != nil {
|
||||
return Die(err)
|
||||
}
|
||||
|
||||
fmt.Fprintln(output, msg)
|
||||
return 0
|
||||
}
|
||||
|
||||
if conf.StoreProgress {
|
||||
progress, err := GetProgress(conf)
|
||||
if err == nil {
|
||||
|
||||
Reference in New Issue
Block a user