-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 the Chocolatey-missing error again #4621
Conversation
06be45c
to
768ca5b
Compare
# if this check is in #define_resource_requirements, it won't get | ||
# run before choco.exe gets called from #load_current_resource. | ||
exe_path = ::File.join(choco_install_path.to_s, "bin", "choco.exe") | ||
if !::File.exist?(exe_path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like some indentation issues here. Also unless
may be clearer than if !
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah that'll be a rubocop violation at some point in the not too distant future...
d7dda1d
to
37baee5
Compare
👍 |
1 similar comment
👍 |
Fix the Chocolatey-missing error again
The previous implementation (in
define_resource_requirements
) failed acceptance testing becausechoco.exe
gets called before that, inload_current_resource
, so the detection needs to be a bit lower-level.This includes a spec that replicates the acceptance test (by calling
load_current_resource
).