We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b7af918 + ec720cf commit a4b59f2Copy full SHA for a4b59f2
lib/puppet/provider/file_line/ruby.rb
@@ -40,7 +40,12 @@ def lines
40
# file; for now assuming that this type is only used on
41
# small-ish config files that can fit into memory without
42
# too much trouble.
43
- @lines ||= File.readlines(resource[:path], :encoding => resource[:encoding])
+ begin
44
+ @lines ||= File.readlines(resource[:path], :encoding => resource[:encoding])
45
+ rescue TypeError => e
46
+ # Ruby 1.8 doesn't support open_args
47
+ @lines ||= File.readlines(resource[:path])
48
+ end
49
end
50
51
def match_regex
0 commit comments