Skip to content

Commit

Permalink
chore: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Aug 8, 2024
1 parent e9b4222 commit 041b7f1
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,9 @@ func defaults(flag string) string {

cwd, wdErr := os.Getwd()
gitRoot, grErr := git.Root()

if wdErr == nil && grErr == nil {

cwd = filepath.Clean(cwd)
gitRoot = filepath.Clean(gitRoot)

if cwd != gitRoot {
prefix := strings.TrimPrefix(cwd, gitRoot)
prefix = strings.TrimPrefix(prefix, string(os.PathSeparator))
Expand Down

0 comments on commit 041b7f1

Please sign in to comment.