diff options
| author | Can Eldem <celdem@gitlab.com> | 2020-10-06 10:37:53 +0000 |
|---|---|---|
| committer | Can Eldem <celdem@gitlab.com> | 2020-10-06 10:37:53 +0000 |
| commit | 7fe70519010e24fa1d6735b108793987e8a24aa4 (patch) | |
| tree | af3d60cd146203f4cc8d04f9a7883ef81f34f836 /lib | |
| parent | ae334f0af0155112c345475d9837de8538b58b7a (diff) | |
| parent | ea3481fdb3bc94ce882f045d42ae9984548fc0e5 (diff) | |
Merge branch 'go-modules-subdir' into 'master'v3.26.1
Scan sub directories of Golang projects
Closes gitlab-org/gitlab#255605
See merge request gitlab-org/security-products/license-management!222
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/license/finder/ext/go_modules.rb | 6 | ||||
| -rw-r--r-- | lib/license/management/tool_box.rb | 2 | ||||
| -rw-r--r-- | lib/license/management/version.rb | 2 |
3 files changed, 7 insertions, 3 deletions
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/tool_box.rb b/lib/license/management/tool_box.rb index 239f88f..ddfd222 100644 --- a/lib/license/management/tool_box.rb +++ b/lib/license/management/tool_box.rb @@ -16,8 +16,10 @@ module License Dir.chdir(project_path) do deb = deb_for(tool, version) if deb&.exist? + ::License::Management.logger.error("Installing #{deb} ...") shell.execute([:dpkg, '-i', deb]) else + ::License::Management.logger.error("Installing #{version} via asdf ...") shell.execute([:asdf, "plugin-update", tool.to_s], env: env) shell.execute(['/opt/asdf/plugins/nodejs/bin/import-release-team-keyring']) if tool == :nodejs end 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 |
