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.
@@ -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)