fix what i broke

This commit is contained in:
Axel Kittenberger 2012-01-27 15:52:42 +01:00
parent 3ae6c8fb77
commit 1b6db3f093

View File

@ -2236,9 +2236,9 @@ local functionWriter = (function()
ft = 'function(event, event2)\n' ft = 'function(event, event2)\n'
end end
ft = ft.. ft = ft..
[[ log('Normal', 'Event ', event.etype, \n]].. " log('Normal', 'Event ', event.etype, \n"..
[[ ' spawns action "]].. str..[["')\n]].. " ' spawns action \"".. str.."\"')\n"..
[[ spawn(event]] " spawn(event"
for _, v in ipairs(args) do for _, v in ipairs(args) do
ft = ft..',\n '..v ft = ft..',\n '..v
end end
@ -2281,9 +2281,9 @@ local functionWriter = (function()
end end
-- TODO do array joining instead -- TODO do array joining instead
ft = ft.. ft = ft..
[[ log('Normal', 'Event ',event.etype,\n]].. " log('Normal', 'Event ',event.etype,\n"..
[[ ' spawns shell "]]..lc..[[")\n]].. " ' spawns shell \""..lc.."\"')\n"..
[[ spawnShell(event, ']]..cmd..[[',]] " spawnShell(event, '"..cmd.."'"
for _, v in ipairs(args) do for _, v in ipairs(args) do
ft = ft..',\n '..v ft = ft..',\n '..v
end end
@ -2829,7 +2829,7 @@ function runner.initialize(firstTime)
for _, fn in ipairs(ufuncs) do for _, fn in ipairs(ufuncs) do
if type(config[fn]) == 'string' then if type(config[fn]) == 'string' then
local ft = functionWriter.translate(config[fn]) local ft = functionWriter.translate(config[fn])
config[fn] = assert(loadstring("return " .. ft))() config[fn] = assert(loadstring('return '..ft))()
end end
end end
end end