Skip to content

Commit

Permalink
Fix absolute path check
Browse files Browse the repository at this point in the history
  • Loading branch information
Flygrounder authored and twpayne committed Apr 3, 2021
1 parent 4d3d6da commit 0c37c54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/chezmoi/path.go
Expand Up @@ -12,7 +12,7 @@ type AbsPath string

// NewAbsPath returns a new AbsPath.
func NewAbsPath(path string) (AbsPath, error) {
if filepath.IsAbs(path) {
if !filepath.IsAbs(path) {
return "", fmt.Errorf("%s: not an absolute path", path)
}
return AbsPath(path), nil
Expand Down

0 comments on commit 0c37c54

Please sign in to comment.