Skip to content

Commit

Permalink
Wrap errors with %w
Browse files Browse the repository at this point in the history
  • Loading branch information
arbourd committed Apr 12, 2024
1 parent 819abbe commit 6e30311
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion open/open.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func getRemoteRef(gitroot string) (remote string, ref string, err error) {
func parseRepository(remote string) (host string, repo string, err error) {
url, err := get.ParseURL(remote)
if err != nil {
return "", "", fmt.Errorf("unable to parse remote url: %s", err)
return "", "", fmt.Errorf("unable to parse remote url: %w", err)
}

repo = strings.TrimPrefix(strings.TrimSuffix(path.Clean(url.Path), ".git"), "/")
Expand Down

0 comments on commit 6e30311

Please sign in to comment.