Skip to content

Commit

Permalink
(maint) Only add newline if string does not end with newline
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis Fields committed May 1, 2015
1 parent f24437c commit 1a2975a
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 1a2975a

Please sign in to comment.