From bb8df68c109bb860df57563d51003034a57bf7e1 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Mon, 19 Feb 2024 14:14:43 -0300 Subject: fix(config): print boolean values correctly on Lua 5.1 --- src/luarocks/cmd/config.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/luarocks/cmd/config.lua b/src/luarocks/cmd/config.lua index 0e7a3e3d..a01d33a9 100644 --- a/src/luarocks/cmd/config.lua +++ b/src/luarocks/cmd/config.lua @@ -219,7 +219,11 @@ local function write_entries(keys, scope, do_unset) if do_unset then print(("\t%s"):format(var)) else - print(("\t%s = %q"):format(var, val)) + if type(val) == "string" then + print(("\t%s = %q"):format(var, val)) + else + print(("\t%s = %s"):format(var, tostring(val))) + end end end print(do_unset and "from" or "to") -- cgit v1.2.3-55-g6feb