From 4436ea76638ec5664c7495aa5cbbd4fde956a5d7 Mon Sep 17 00:00:00 2001 From: Sam Roxanne Date: Tue, 2 Jun 2020 12:14:24 -0500 Subject: [PATCH] what in the everliving name of fuck --- src/cfg/minifier_providers.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/cfg/minifier_providers.lua b/src/cfg/minifier_providers.lua index a4172ca..d4e070e 100644 --- a/src/cfg/minifier_providers.lua +++ b/src/cfg/minifier_providers.lua @@ -25,13 +25,20 @@ local providers = {} function providers.luamin(cin) local fn = os.tmpname() +-- io.stderr:write("DEBUG: ",fn,"\n") local fh = io.open(fn, "w") fh:write(cin) fh:close() - local lmh = io.popen("luamin -f "..fn.." 2>&1", "r") + -- I have no idea why luamin keeps throwing errors in my buildscript + -- if I make this `luamin -f ` and I have no fucking clue as + -- to why this fixes it, but I guess I shouldn't complain. But I will + -- anyways. What the actual fuck is this and what the actual fuck was + -- that error? + local lmh = io.popen("cat \""..fn.."\" | luamin -c", "r") +-- io.stderr:write("DEBUG: ", "luamin -f "..fn.." 2>&1", "\n") local dat = lmh:read("*a") local stat, _, code = lmh:close() - os.remove(fn) + --os.remove(fn) if (code ~= 0) then return false, dat end