Fix overwrite not working

This commit is contained in:
2021-12-06 15:48:55 +01:00
parent b2d824de24
commit 8906b4aa01
2 changed files with 19 additions and 2 deletions

View File

@@ -234,6 +234,11 @@ func DefaultConfigFilePath() (string, error) {
}
func (c *Config) ToWriter(w io.Writer) error {
encoder := toml.NewEncoder(w)
return encoder.Encode(c)
}
func (c *Config) ToDefaultFile() error {
if err := CreateDefaultConfigDir(); err != nil {
return err