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

This fixes a Duplicate declaration error #86

Closed
wants to merge 1 commit into from

Conversation

daveseff
Copy link

On new versions of puppet the (! defined) does not seem to work any more. This is the preferred syntax.

@derdanne
Copy link
Contributor

derdanne commented Sep 27, 2018

Hi, thanks. We need to keep the backwards compatibility. I am not through the release and upgrade notes for Puppet 6 - but we definitely need a switch depending on the client version here.

@@ -49,7 +49,7 @@
content => $line,
}

if ! defined(File[$name]) {
unless File["${name}"] {
Copy link
Contributor

Choose a reason for hiding this comment

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

This will fix your puppet-lint error, there is no need to quote a string that contains only a var

Suggested change
unless File["${name}"] {
unless File[$name] {

@derdanne
Copy link
Contributor

derdanne commented Feb 8, 2019

fixed in 2.1.0

@derdanne derdanne closed this Feb 8, 2019
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.

3 participants