gluon-core: add newline to the end of sysconfig files

Both gluon.sysconfig and libgluonutil already remove the trailing newline
if it exists. It's nicer to avoid files without a trailing newline, e.g.
for printing the file contents in a terminal.
This commit is contained in:
Matthias Schiffer 2018-02-15 18:43:49 +01:00
parent 427c83754b
commit 345a5de861
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C

View File

@ -13,7 +13,7 @@ end
local function set(_, name, val)
if val then
local f = io.open(sysconfigdir .. name, 'w+')
f:write(val)
f:write(val, '\n')
f:close()
else
os.remove(sysconfigdir .. name)