Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
Signed-off-by: Will Wang <[email protected]>
  • Loading branch information
willww64 committed Jul 24, 2024
1 parent a85a37e commit 0118291
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli/config/configfile/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,12 @@ func (configFile *ConfigFile) Save() (retErr error) {
return errors.Wrap(err, "error closing temp file")
}

// Handle situations where `configFile.Filename` is a symlink, and allow for dangling symlinks
// Handle situation where the configfile is a symlink, and allow for dangling symlinks
cfgFile := configFile.Filename
if f, err := filepath.EvalSymlinks(cfgFile); err == nil {
cfgFile = f
} else if os.IsNotExist(err) {
// extract the path from the error if `cfgFile` does not exist or is a dangling symlink
// extract the path from the error if the configfile does not exist or is a dangling symlink
cfgFile = err.(*os.PathError).Path
}

Expand Down

0 comments on commit 0118291

Please sign in to comment.