aboutsummaryrefslogtreecommitdiffstats
path: root/copilot.moon
diff options
context:
space:
mode:
Diffstat (limited to 'copilot.moon')
-rw-r--r--copilot.moon3
1 files changed, 2 insertions, 1 deletions
diff --git a/copilot.moon b/copilot.moon
index d0dec92..cef664a 100644
--- a/copilot.moon
+++ b/copilot.moon
@@ -24,6 +24,7 @@ class Copilot
@registry\patch_root root
spit @file, root\stringify!
+ tb = (msg) -> debug.traceback msg, 2
poll: =>
{ :mode, :modification } = (lfs.attributes @file) or {}
if mode != 'file'
@@ -31,7 +32,7 @@ class Copilot
if @last_modification < modification
print "---"
- ok, err = pcall @patch, @
+ ok, err = xpcall @patch, tb, @
if not ok
print "ERROR: #{err}"