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

knife cookbook upload throws error undefined method `metadata' for nil:NilClass when try to upload any blank cookbook directory. #9010

Open
Vasu1105 opened this issue Oct 21, 2019 · 0 comments

Comments

@Vasu1105
Copy link
Contributor

@Vasu1105 Vasu1105 commented Oct 21, 2019

Description

knife cookbook upload throws error undefined method `metadata' for nil:NilClass when there is blank directory in the cookbooks directory.

Expectation: It should throw user friendly error.

Chef Version

Working with master branch.

Platform Version

Replication Case

Try to upload any blank cookbook from the chef repository
.

Client Output

$ knife cookbook upload blank_dir -c ~/workspace/chef-repo/.chef/knife.rb 
WARN: Found a directory blank_dir in the cookbook path, but it contains no cookbook files. skipping.
ERROR: knife encountered an unexpected error
This may be a bug in the 'cookbook upload' knife command or plugin
Please collect the output of this command with the `-VVV` option before filing a bug report.
Exception: NoMethodError: undefined method `metadata' for nil:NilClass

Stacktrace

@Vasu1105 Vasu1105 self-assigned this Oct 21, 2019
Vasu1105 added a commit to MsysTechnologiesllc/chef that referenced this issue Oct 21, 2019
…r the blank cookbooks. Fixes chef#9010

Signed-off-by: Vasu1105 <vasundhara.jagdale@msystechnologies.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.