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

berks verify path is broken #1830

Closed
bmhughes opened this issue Jan 16, 2020 · 1 comment · Fixed by #1833
Closed

berks verify path is broken #1830

bmhughes opened this issue Jan 16, 2020 · 1 comment · Fixed by #1833

Comments

@bmhughes
Copy link

bmhughes commented Jan 16, 2020

When running berks verify I get the following trace:

ArgumentError Cannot find cookbook test_cookbook unless Chef::Config.cookbook_path is set or an explicit cookbook path is given. Path /home/user/.berkshelf/cookbooks/test_cookbook-0.2.3.
	/opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/chef-15.6.10/lib/chef/cookbook/syntax_check.rb:95:in `for_cookbook'
	/opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/berkshelf-7.0.8/lib/berkshelf/cached_cookbook.rb:154:in `validate'
	/opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/berkshelf-7.0.8/lib/berkshelf/validator.rb:14:in `block in validate'
	/opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/berkshelf-7.0.8/lib/berkshelf/validator.rb:12:in `each'
	/opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/berkshelf-7.0.8/lib/berkshelf/validator.rb:12:in `validate'
	/opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/berkshelf-7.0.8/lib/berkshelf/berksfile.rb:702:in `verify'
	/opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/berkshelf-7.0.8/lib/berkshelf/cli.rb:385:in `verify'
	/opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
	/opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
	/opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
	/opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/berkshelf-7.0.8/lib/berkshelf/cli.rb:47:in `dispatch'
	/opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
	/opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/berkshelf-7.0.8/lib/berkshelf/cli.rb:23:in `execute!'
	/opt/chef-workstation/embedded/lib/ruby/gems/2.6.0/gems/berkshelf-7.0.8/bin/berks:5:in `<top (required)>'
	/bin/berks:363:in `load'
	/bin/berks:363:in `<main>'

The problem seems to be possibly syntax_check.rb#L89 as the cookbook name is appended to the expanded path which will not exist and will always raise. The removal of File.join does seem to fix it.

@lock
Copy link

lock bot commented Mar 27, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant