You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A string is executed as a shell command. If the command returns 0, the guard is applied. If the command returns any other value, then the guard is not applied.
A block is executed as Ruby code that must return either true or false. If the block returns true, the the guard is applied. If the block returns false, the guard is not applied.
I guess it is because "{}" interpret as a Ruby code block in chef. The "gem list | grep resque" will become string inside the {}, thus it will always return true.
The fix should be remove the {} block.
i.e. not_if { "gem list | grep resque" }
not_if"gem list | grep resque"
The text was updated successfully, but these errors were encountered:
cookbooks/resque/recipes/default.rb:9
cookbooks/resque-scheduler/recipes/default.rb:8
I find the above 2 lines will always return true.
According to http://docs.opscode.com/resource_common.html#guards
I guess it is because "{}" interpret as a Ruby code block in chef. The "gem list | grep resque" will become string inside the {}, thus it will always return true.
The fix should be remove the {} block.
i.e.
not_if { "gem list | grep resque" }The text was updated successfully, but these errors were encountered: