Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix autocorrection of multiple platform helpers in a recipe #303

Merged
merged 1 commit into from
Oct 2, 2019

Conversation

tas50
Copy link
Contributor

@tas50 tas50 commented Oct 2, 2019

This is a major facepalm here and looking back it makes total sense. All the on_* hooks run and then all the autocorrects run. That means when I set @type and @plat they'd get used by all the autocorrectors and every node['platform'
] == 'foo' would be autocorrected to the last platform found in the recipe.

resolves #301

Signed-off-by: Tim Smith tsmith@chef.io

@tas50 tas50 requested review from a team as code owners October 2, 2019 20:42
This is a major facepalm here and looking back it makes total sense. All the on_* hooks run and then all the autocorrects run. That means when I set @type and @plat they'd get used by all the autocorrectors and every node['platform'
] == 'foo' would be autocorrected to the last platform found in the recipe.

Signed-off-by: Tim Smith <tsmith@chef.io>
@tas50 tas50 merged commit 8167694 into master Oct 2, 2019
@chef-expeditor chef-expeditor bot deleted the fix_platform_bug branch October 2, 2019 20:55
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.

ChefStyle/UsePlatformHelpers autocorrect is wrong
1 participant