Skip to content

check if cb doesnt exist - #16

Open
vishalbasra wants to merge 3 commits into
brentm5:masterfrom
vishalbasra:master
Open

check if cb doesnt exist#16
vishalbasra wants to merge 3 commits into
brentm5:masterfrom
vishalbasra:master

Conversation

@vishalbasra

Copy link
Copy Markdown

Based off of #5

If the cookbook doesn't exist, the object which forms as a result of this query / api call
search_nodes("cookbooks_#{@cookbook_name}:*") is []

I tried comparing it to nil ( because that's what i think is going on here) and other things but i couldn't get it to work ( ruby noob )
comparing against a string '[]' works and if the cookbook wasn't found, we error out and exit.

I dunno if we have to run like a lintt status checker, update the gem version etc. etc. cause this is the first time I'm doing this, but I think we might have to, let me know!

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

Successfully merging this pull request may close these issues.

1 participant