We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19b0d20 commit 8057f1bCopy full SHA for 8057f1b
internal/devconfig/configfile/file.go
@@ -110,6 +110,13 @@ func (c *ConfigFile) InitHook() *shellcmd.Commands {
110
// SaveTo writes the config to a file.
111
func (c *ConfigFile) SaveTo(path string) error {
112
return os.WriteFile(filepath.Join(path, DefaultName), c.Bytes(), 0o644)
113
+ finalPath := path
114
+ if filepath.Base(path) != DefaultName {
115
+ finalPath = filepath.Join(path, DefaultName)
116
+ }
117
+
118
+ //return os.WriteFile(filepath.Join(path, DefaultName), c.Bytes(), 0o644)
119
+ return os.WriteFile(filepath.Join(finalPath), c.Bytes(), 0o644)
120
}
121
122
// TODO: Can we remove SaveTo and just use Save()?
0 commit comments