From f2a836e1ba1861fa4a93a63631ddf4ec99eb6c3d Mon Sep 17 00:00:00 2001 From: mo khan Date: Thu, 24 Sep 2020 13:59:49 -0600 Subject: Perform scan from within dir containing `go.mod` * fix: perform scan from within dir containing `go.mod` * docs: add changelog entry * test: add spec to reproduce defect --- lib/license/finder/ext/go_modules.rb | 6 ++++-- lib/license/management/version.rb | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/license/finder/ext/go_modules.rb b/lib/license/finder/ext/go_modules.rb index 63b4772..a0fcb96 100644 --- a/lib/license/finder/ext/go_modules.rb +++ b/lib/license/finder/ext/go_modules.rb @@ -15,8 +15,10 @@ module LicenseFinder end def current_packages - modules = vendored? ? parse_go_sum : go_list_all - modules.map { |hash| map_from(hash) }.compact + within_project_path do + modules = vendored? ? parse_go_sum : go_list_all + modules.map { |hash| map_from(hash) }.compact + end end private diff --git a/lib/license/management/version.rb b/lib/license/management/version.rb index f67050b..8ffd30d 100644 --- a/lib/license/management/version.rb +++ b/lib/license/management/version.rb @@ -2,6 +2,6 @@ module License module Management - VERSION = '3.26.0' + VERSION = '3.26.1' end end -- cgit v1.2.3