[chef] Re: Re: Re: Re: "knife cookbook site install" fails. Knife or Git issue?


Chronological Thread 
  • From: Akzhan Abdulin < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: "knife cookbook site install" fails. Knife or Git issue?
  • Date: Fri, 6 May 2011 18:31:16 +0400
  • 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=HTL3qxVk79L9JjhF1MJG4pi59UntqUXK/BJF56/QnAC7RXgQEM6D4tFjAzcWkERJFL y8u10ocfdkm/a62DGwyLxPDG6WyvbjUNLe9Lnb2hxJzJXbTR9A3MBTGu6pWhCU7vlMwj nfAAijLf9qvqg5hkY+6NLKTAgjbBEkqpziK7M=

Take a note that output of git branch --no-color looks like:
$ git branch --no-color
  0.9-stable
  CHEF-1669-0.9-stable
  CHEF-1956
  CHEF-1956-0.9-stable
  CHEF-2123
  CHEF-2207
* CHEF-2314
  master

Take a note that one of the lines marked as current branch. So we must use not strict matching but regexp matching.

2011/5/6 Ringo De Smet < "> >
Akzhan,

On 6 May 2011 15:59, Akzhan Abdulin < "> > wrote:
> Fixed by https://github.com/akzhan/chef/tree/CHEF-2314, ticket is resolved
> and passed to Adam Jacob.

As Mark indicated, wouldn't the fix be easier if we fall back to
ary.include? instead?
http://www.ruby-doc.org/core/classes/Array.html#M000265

git("branch --no-color").stdout.lines.include?(branch_name)

Ringo




Archive powered by MHonArc 2.6.16.

§