- From: Ringo De Smet <
>
- To:
- Subject: [chef] Re: Re: Re: "knife cookbook site install" fails. Knife or Git issue?
- Date: Fri, 6 May 2011 16:11:44 +0200
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=MQoOSpP6qdyT8SM5LiZHRzK5KKxNl3vX6v/kfgere1ZzHPdCzWELKb1WgIjHOOFiFP fGhhvJT8nIl6BUmpsxn9D/DXjkS9cJq6DiAYHwCxD4h5/p28UsCAHtIaQJ+dWfmjEVGG ifow4YyT9MXWG/fSJMMb+4a/7KmwDZ0zKBf48=
Mark,
On 6 May 2011 15:59, Mark J. Reed
<
>
wrote:
>
I don't have the Chef server code in front of me, but are you sure it's
>
calling include? on the individual strings rather than the whole list?The
>
latter would seem to make more sense in this instance.
>
["chef-vendor-rabbitmq_chef"].include?("chef-vendor-rabbitmq") => false
It is not a collection include that is used. Here is the faulty code:
git("branch --no-color").stdout.lines.any? {|l| l.include?(branch_name) }
The include? is invoked on any element of the collection, which
results in a string compare.
Ringo
Archive powered by MHonArc 2.6.16.