Merge pull request #5 from shakesoda/patch-2

Add a mechanism to stop a hotswap from occurring.
This commit is contained in:
rxi
2015-03-04 20:16:28 +00:00

View File

@@ -210,7 +210,11 @@ function lurker.hotswapfile(f)
if lurker.state == "error" then if lurker.state == "error" then
lurker.exiterrorstate() lurker.exiterrorstate()
end end
lurker.preswap(f) if lurker.preswap(f) then
lurker.print("Hotswap of '{1}' aborted by preswap'", {f})
lurker.resetfile(f)
return
end
local modname = lurker.modname(f) local modname = lurker.modname(f)
local t, ok, err = lume.time(lume.hotswap, modname) local t, ok, err = lume.time(lume.hotswap, modname)
if ok then if ok then