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

Don't overwrite or calculate the environment twice #761

Merged

Conversation

janfabry
Copy link
Contributor

#688 passed the environment parameter, but did not notice that it was already calculated. And we should duplicate the connect_settings, otherwise we add to it.

Fixes https://tickets.puppetlabs.com/browse/MODULES-3311

end
end

private

def get_environment
environment = resource[:connect_settings] || {}
environment = resource[:connect_settings].dup || {}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This doesn't work when resource[:connect_settings] is empty. I guess environment = environment.dup on the next line is better, but I'll verify that when I have a test environment set up.

@janfabry janfabry force-pushed the MODULES-3311-environment-duplication branch from 9413304 to 47ab296 Compare April 29, 2016 19:39
@jonnytdevops jonnytdevops merged commit f040dd2 into puppetlabs:master May 12, 2016
cegeka-jenkins pushed a commit to cegeka/puppet-postgresql that referenced this pull request Oct 23, 2017
…ent-duplication

Don't overwrite or calculate the environment twice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants