Skip to content

Commit

Permalink
Consider pinned repos when locking packages
Browse files Browse the repository at this point in the history
Signed-off-by: Jon Johnson <[email protected]>
  • Loading branch information
jonjohnsonjr committed Jan 7, 2025
1 parent ed51f76 commit 7ae4943
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/build/lock.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ func unify(originals []string, inputs []resolved) (map[string][]string, map[stri
if idx := strings.IndexAny(orig, "=<>~"); idx >= 0 {
name = orig[:idx]
}
// If we're using a pinned repo (foo@local), strip that as well.
if idx := strings.Index(orig, "@"); idx >= 0 {
name = orig[:idx]
}
originalPackages.packages.Insert(name)
originalPackages.versions[name] = strings.TrimPrefix(orig, name)
}
Expand Down

0 comments on commit 7ae4943

Please sign in to comment.