Skip to content

Commit

Permalink
fix: v2 repo without subdir was treated as having subdirs
Browse files Browse the repository at this point in the history
  • Loading branch information
christophberger committed Jun 27, 2024
1 parent a5f902f commit ead15d7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion goman.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@ func sources(src string) (srcs []string) {
}()

lenProjPath := 3
if isVersioned && len(postVersion) > 0 {
if isVersioned && (len(postVersion) > 0 || // github.com/org/repo/v2/subdir
len(dirs) == 4) { // github.com/org/repo/v2 (no subdir)
// version string occurs after project path but before subdir path (if any)
lenProjPath = 4
}
Expand Down

0 comments on commit ead15d7

Please sign in to comment.