Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add -buildvcs=false to the go list command #1048

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/license_finder/package_managers/go_modules.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def packages_info
# TODO: Figure out a way to make the vendor directory work (i.e. remove the
# -mod=readonly flag). Each of the imported packages gets listed separatly,
# confusing the issue as to which package is the root of the module.
go_list_cmd = "GO111MODULE=on go list -mod=readonly -deps -f '#{format_str}' ./..."
go_list_cmd = "GO111MODULE=on go list -mod=readonly -buildvcs=false -deps -f '#{format_str}' ./..."
info_output, stderr, status = Cmd.run(go_list_cmd)
log_errors_with_cmd(go_list_cmd, "Getting the dependencies from go list failed \n\t#{stderr}") unless status.success?
raise "Command '#{go_list_cmd}' failed to execute" unless status.success?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module LicenseFinder
subject { GoModules.new(project_path: Pathname(src_path), logger: logger, log_directory: 'some-directory') }

describe '#current_packages' do
let(:go_list_cmd) { "GO111MODULE=on go list -mod=readonly -deps -f '#{go_list_format}' ./..." }
let(:go_list_cmd) { "GO111MODULE=on go list -mod=readonly -buildvcs=false -deps -f '#{go_list_format}' ./..." }

before do
FakeFS.activate!
Expand Down