Merge pull request #672 from 14rcole/find-godeps-fix

Fix bug in find-godeps
This commit is contained in:
Mrunal Patel 2017-07-19 16:15:52 -07:00 committed by GitHub
commit 0eb5cd527f

View file

@ -23,7 +23,7 @@ function find-deps() {
local deps= local deps=
# gather imports from cri-o # gather imports from cri-o
pkgs=$(cd ${basepath}/${srcdir} && go list -f "{{.Imports}}" . | tr ' ' '\n' | grep -v "/vendor/" | grep ${pkgname} | sed -e "s|${pkgname}/||g") pkgs=$(cd ${basepath}/${srcdir} && go list -f "{{.Imports}}" . | tr ' ' '\n' | tr -d '[]' | grep -v "/vendor/" | grep ${pkgname} | sed -e "s|${pkgname}/||g")
# add each Go import's sources to the deps list, # add each Go import's sources to the deps list,
# and recursively get that imports's imports too # and recursively get that imports's imports too