Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

Commit

Permalink
panic: bump jargo to avoid panic, if err continue processing for java
Browse files Browse the repository at this point in the history
Signed-off-by: mcoops <[email protected]>
  • Loading branch information
mcoops committed Apr 21, 2021
1 parent b5e61f4 commit 683339a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 17 deletions.
31 changes: 15 additions & 16 deletions deplist.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,22 +113,21 @@ func GetDeps(fullPath string) ([]Dependency, Bitmask, error) {
// java
if ext == ".jar" || ext == ".war" || ext == ".hpi" {
pkgs, err := scan.GetJarDeps(path)
if err != nil {
return err
}

if len(pkgs) > 0 {
foundTypes.DepFoundAddFlag(LangJava)
}

for name, version := range pkgs {
deps = append(deps,
Dependency{
DepType: LangJava,
Path: name,
Version: version,
Files: []string{},
})
if err == nil {

if len(pkgs) > 0 {
foundTypes.DepFoundAddFlag(LangJava)
}

for name, version := range pkgs {
deps = append(deps,
Dependency{
DepType: LangJava,
Path: name,
Version: version,
Files: []string{},
})
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/mcoops/deplist
go 1.13

require (
github.com/mcoops/jargo v0.0.0-20210410052334-26a02fc9f941
github.com/mcoops/jargo v0.0.0-20210421021107-8a7c97c9fc53
golang.org/x/mod v0.3.0
golang.org/x/tools v0.0.0-20201223010750-3fa0e8f87c1a
)
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/mcoops/jargo v0.0.0-20210410052334-26a02fc9f941 h1:9o1RYcjhgJ7q4oaxHrmOYo3yGpBTUmqEMB21YwK0im0=
github.com/mcoops/jargo v0.0.0-20210410052334-26a02fc9f941/go.mod h1:iSH9HuMFpODf8aG84m6UNrw3tULVYLKWl68rQcYxyiE=
github.com/mcoops/jargo v0.0.0-20210421020551-3a62b19becd9 h1:OMfYen7su1IM7INow4TWbYEKbRT9vnsTn4+BYfttpYI=
github.com/mcoops/jargo v0.0.0-20210421020551-3a62b19becd9/go.mod h1:iSH9HuMFpODf8aG84m6UNrw3tULVYLKWl68rQcYxyiE=
github.com/mcoops/jargo v0.0.0-20210421021107-8a7c97c9fc53 h1:2rp0izvEiPOVKnFvWYoxIa4ews9BobHLjtt5tAWT6xw=
github.com/mcoops/jargo v0.0.0-20210421021107-8a7c97c9fc53/go.mod h1:iSH9HuMFpODf8aG84m6UNrw3tULVYLKWl68rQcYxyiE=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
Expand Down

0 comments on commit 683339a

Please sign in to comment.