Closed vfonic closed 8 years ago
Sorry, I'm really lost and confused. I merged an old pull request that refactored some conditionals. I think there was a typo: the single equal should be a double equal. Is that right? Is that what you've determined? Shall I make the single equal a double equal? I don't have time to investigate so if you can make a recommendation, I'll act on it.
For some strange reason, when using double equal, and
defaults.yml
, the following command resolved prefs[:pref] to 'none':While this works just fine:
defaults.yml
:I guess the issue is due to
prefs[:admin]
being set, but we're checkingconfig['admin']
. Whenconfig['admin'] == 'none'
is false we setprefs[:admin]
which is wrong.Here are two examples, one with single equals sign, one with two: https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/admin.rb#L4
https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/extras.rb#L76
EDIT: Digging deeper, here's what I've found out:
Outputs:
Double equals:
Outputs: