mirror of
https://github.com/inspec/inspec
synced 2024-11-23 05:03:07 +00:00
Fix issue when xinetd.conf does not end in newline (#2040)
Add a newline symbol to the end of the parsed input. Sample hexdump of a file deployed by xinetd cookbook: $ hexdump -C /var/chef/cache/cookbooks/xinetd/templates/default/xinetd.conf.erb | tail -2 000000b0 72 20 2f 65 74 63 2f 78 69 6e 65 74 64 2e 64 |r /etc/xinetd.d| 000000bf Signed-off-by: Simonas Kareiva <simonas@5grupe.lt>
This commit is contained in:
parent
4ae34928ca
commit
da75f268bc
1 changed files with 1 additions and 1 deletions
|
@ -211,7 +211,7 @@ module XinetdParser
|
|||
res = {}
|
||||
cur_group = nil
|
||||
simple_conf = []
|
||||
rest = raw
|
||||
rest = raw + "\n"
|
||||
until rest.empty?
|
||||
# extract content line
|
||||
nl = rest.index("\n") || (rest.length-1)
|
||||
|
|
Loading…
Reference in a new issue