We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c90705a commit d9c9095Copy full SHA for d9c9095
cli/config/configfile/file.go
@@ -169,12 +169,8 @@ func (configFile *ConfigFile) Save() (retErr error) {
169
170
// Handle situation where the configfile is a symlink
171
cfgFile := configFile.Filename
172
- if f, err := os.Readlink(cfgFile); err == nil {
+ if f, err := filepath.EvalSymlinks(cfgFile); err == nil {
173
cfgFile = f
174
- // The target of a symlink can be a relative path, ensure the final path is absolute
175
- if !filepath.IsAbs(f) {
176
- cfgFile = filepath.Join(dir, f)
177
- }
178
}
179
180
// Try copying the current config file (if any) ownership and permissions
0 commit comments