diff --git a/deplist.go b/deplist.go index d1cc9d0..7b25111 100644 --- a/deplist.go +++ b/deplist.go @@ -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{}, + }) + } } } } diff --git a/go.mod b/go.mod index f3ce2ee..05e1b2d 100644 --- a/go.mod +++ b/go.mod @@ -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 ) diff --git a/go.sum b/go.sum index 57b5cc5..dd618ba 100644 --- a/go.sum +++ b/go.sum @@ -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=