Skip to content

Commit

Permalink
Merge pull request #308 from cyberious/master
Browse files Browse the repository at this point in the history
(maint) Only add newline if string does not end with newline
  • Loading branch information
bmjen committed May 4, 2015
2 parents 0587e37 + 1a2975a commit ee3e184
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/puppet/type/concat_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def fragment_content(r)
end

if self[:ensure_newline]
fragment_content<<"\n"
fragment_content<<"\n" unless fragment_content =~ /\n$/
end
fragment_content
Expand Down

0 comments on commit ee3e184

Please sign in to comment.