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 the Chocolatey-missing error again #4621

Merged
merged 4 commits into from
Feb 26, 2016
Merged

Fix the Chocolatey-missing error again #4621

merged 4 commits into from
Feb 26, 2016

Conversation

randomcamel
Copy link
Contributor

The previous implementation (in define_resource_requirements) failed acceptance testing because choco.exe gets called before that, in load_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).

@randomcamel randomcamel changed the title WIP: Fix the Chocolatey-missing error again Fix the Chocolatey-missing error again Feb 25, 2016
# 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)
Copy link
Member

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 !.

Copy link
Contributor

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...

@mwrock
Copy link
Member

mwrock commented Feb 26, 2016

👍

1 similar comment
@btm
Copy link
Contributor

btm commented Feb 26, 2016

👍

btm added a commit that referenced this pull request Feb 26, 2016
Fix the Chocolatey-missing error again
@btm btm merged commit bea0bdf into master Feb 26, 2016
@btm btm deleted the cd/fix-choco-error branch February 26, 2016 20:14
@mwrock mwrock added the Bug label Mar 2, 2016
@thommay thommay added Type: Bug Does not work as expected. and removed Bug labels Jan 25, 2017
@chef chef locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Bug Does not work as expected.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants