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 Go scanning #1047

Open
emmahsax opened this issue Sep 26, 2024 · 0 comments
Open

Add -buildvcs=false to Go scanning #1047

emmahsax opened this issue Sep 26, 2024 · 0 comments

Comments

@emmahsax
Copy link

Would you be willing to add -buildvcs=false to the Go scanning command? I don't think we really need to get the VCS history as part of the license finder.

I am running this license finder in GitHub Actions as part of our CI/CD. But I keep getting this issue:

/usr/local/bundle/gems/license_finder-7.2.1/lib/license_finder/package_managers/go_modules.rb:63:in `block in packages_info': Command 'GO111MODULE=on go list -mod=readonly -deps -f '{{ if and (.DepOnly) (.Module) (not .Standard) }}{{ $mod := (or .Module.Replace .Module) }}{{ $mod.Path }},{{ $mod.Version }},{{ or $mod.Dir .Dir }}{{ end }}' ./...' failed to execute (RuntimeError)
	from /usr/local/bundle/gems/license_finder-7.2.1/lib/license_finder/package_managers/go_modules.rb:32:in `chdir'
	from /usr/local/bundle/gems/license_finder-7.2.1/lib/license_finder/package_managers/go_modules.rb:32:in `packages_info'
	from /usr/local/bundle/gems/license_finder-7.2.1/lib/license_finder/package_managers/go_modules.rb:20:in `current_packages'
	from /usr/local/bundle/gems/license_finder-7.2.1/lib/license_finder/package_manager.rb:105:in `current_packages_with_relations'
	from /usr/local/bundle/gems/license_finder-7.2.1/lib/license_finder/scanner.rb:42:in `each'
	from /usr/local/bundle/gems/license_finder-7.2.1/lib/license_finder/scanner.rb:42:in `flat_map'
	from /usr/local/bundle/gems/license_finder-7.2.1/lib/license_finder/scanner.rb:42:in `active_packages'
	from /usr/local/bundle/gems/license_finder-7.2.1/lib/license_finder/core.rb:84:in `current_packages'
	from /usr/local/bundle/gems/license_finder-7.2.1/lib/license_finder/core.rb:79:in `decision_applier'
	from /usr/local/lib/ruby/3.3.0/forwardable.rb:234:in `any_packages?'
	from /usr/local/bundle/gems/license_finder-7.2.1/lib/license_finder/license_aggregator.rb:17:in `block in any_packages?'
	from /usr/local/bundle/gems/license_finder-7.2.1/lib/license_finder/license_aggregator.rb:15:in `map'
	from /usr/local/bundle/gems/license_finder-7.2.1/lib/license_finder/license_aggregator.rb:15:in `any_packages?'
	from /usr/local/bundle/gems/license_finder-7.2.1/lib/license_finder/cli/main.rb:121:in `action_items'
	from /usr/local/bundle/gems/thor-1.3.2/lib/thor/command.rb:28:in `run'
	from /usr/local/bundle/gems/thor-1.3.2/lib/thor/invocation.rb:127:in `invoke_command'
	from /usr/local/bundle/gems/thor-1.3.2/lib/thor.rb:538:in `dispatch'
	from /usr/local/bundle/gems/thor-1.3.2/lib/thor/base.rb:584:in `start'
	from /usr/local/bundle/gems/license_finder-7.2.1/bin/license_finder:6:in `<top (required)>'
	from /usr/local/bundle/bin/license_finder:25:in `load'
	from /usr/local/bundle/bin/license_finder:25:in `<main>'
LicenseFinder::GoModules: is active for '/__w/repo-name/repo-name'
GO111MODULE=on go list -mod=readonly -deps -f '{{ if and (.DepOnly) (.Module) (not .Standard) }}{{ $mod := (or .Module.Replace .Module) }}{{ $mod.Path }},{{ $mod.Version }},{{ or $mod.Dir .Dir }}{{ end }}' ./...: did not succeed.
GO111MODULE=on go list -mod=readonly -deps -f '{{ if and (.DepOnly) (.Module) (not .Standard) }}{{ $mod := (or .Module.Replace .Module) }}{{ $mod.Path }},{{ $mod.Version }},{{ or $mod.Dir .Dir }}{{ end }}' ./...: Getting the dependencies from go list failed 
	error obtaining VCS status: exit status 128
	Use -buildvcs=false to disable VCS stamping.
error obtaining VCS status: exit status 128
	Use -buildvcs=false to disable VCS stamping.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant