Skip to content

Commit

Permalink
Set -buildvcs=false in the Go dependency scanning (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
emmahsax authored Sep 27, 2024
1 parent 00b04cb commit f622186
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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

0 comments on commit f622186

Please sign in to comment.