Skip to content
This repository was archived by the owner on Aug 26, 2023. It is now read-only.

Commit 872f6d2

Browse files
Do not ignore mismatched dependencies that do not report tags from the GitHub API
1 parent 8ee0242 commit 872f6d2

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func run(depGopkgLockPath, goListModAllPath, githubAuthUsername, githubAuthPassw
8383
tags, err := getTagsAndRevisions(ip, githubAuthUsername, githubAuthPassword)
8484
if err != nil {
8585
fmt.Fprintln(os.Stderr, "Error retrieving alternative tags:", err)
86-
} else if tags[dep] == tags[mod] || tags[dep] == mod || tags[mod] == dep {
86+
} else if len(tags) > 0 && (tags[dep] == tags[mod] || tags[dep] == mod || tags[mod] == dep) {
8787
continue
8888
}
8989
fmt.Println("! ", ip, dep, "=>", mod)

testdata/1/output.txt

+7
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,10 @@ Added:
3434
Changed:
3535
! github.com/onsi/ginkgo c73579c58881 => v1.7.0
3636
! github.com/onsi/gomega 649b44d988ce => v1.4.3
37+
! github.com/rcrowley/go-metrics a5cfc242a56b => cac0b30c2563
38+
! golang.org/x/crypto 7f87c0fbb88b => cc06ce4a13d4
39+
! golang.org/x/net 9bc2a3340c92 => 60506f45cf65
40+
! golang.org/x/sys cc5685c2db12 => 5da285871e9c
41+
! golang.org/x/text 1cbadb444a80 => v0.3.2
42+
! gopkg.in/fatih/set.v0 57907de30022 => v0.1.0
43+
! gopkg.in/yaml.v2 7ad95dd0798a => v2.2.2

0 commit comments

Comments
 (0)