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

Avoiding puppet returning 2 instead of 0 #56

Merged
merged 1 commit into from
Apr 20, 2015

Conversation

magmax
Copy link

@magmax magmax commented Apr 20, 2015

This small change avoids puppet to treturn 2 instead of 0 when there are no changes to be done.

@@ -178,7 +178,7 @@ def self.instances
else
values = line.split(' ')
end
packages << new({ :name => values[0], :ensure => values[1], :provider => self.name })
packages << new({ :name => values[0].downcase, :ensure => values[1], :provider => self.name })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @magmax - Your commit message doesn't say much, so I'm going to ask, why is this necessary? What version where you on before?

Was it 0.5.0 / 0.5.1?

We provide a downcase on the query as of 0.5.0 - cb7f0e5

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I`m sorry!

I was using version 0.5.0, trying to install nssm with this module:

class nssm (
    $version = latest,
    $source  = 'SEE NOTES',
) inherits nssm::params {

    package{'nssm':
        ensure   => $version,
        source   => $source,
    }

}

where the source was a miror of nuget central. The package is called "NSSM" and puppet returned 2 again and again. After this change it started to work.

I already know it is being done in the caller, but I do not know if this method is overriding an API method that can be called in other place.

Sadly, I cannot reproduce it right now; my whole environment is failing right now with other problem.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You want to be on at least 0.5.1 - 0.5.0 has issues on Linux masters.

ferventcoder added a commit that referenced this pull request Apr 20, 2015
Avoiding puppet returning 2 instead of 0
@ferventcoder ferventcoder merged commit 8bd53b4 into chocolatey-archive:master Apr 20, 2015
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.

2 participants