aboutsummaryrefslogtreecommitdiff
path: root/src/luarocks/command_line.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/luarocks/command_line.lua')
-rw-r--r--src/luarocks/command_line.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/luarocks/command_line.lua b/src/luarocks/command_line.lua
index e79b1442..19d04290 100644
--- a/src/luarocks/command_line.lua
+++ b/src/luarocks/command_line.lua
@@ -185,7 +185,8 @@ function run_command(...)
185 -- I'm not changing this now to avoid messing with the run() 185 -- I'm not changing this now to avoid messing with the run()
186 -- interface, which I know some people use (even though 186 -- interface, which I know some people use (even though
187 -- I never published it as a public API...) 187 -- I never published it as a public API...)
188 local xp, ok, err, exitcode = xpcall(function() return commands[command].run(unpack(args)) end, function(err) 188 local cmd = require(commands[command])
189 local xp, ok, err, exitcode = xpcall(function() return cmd.run(unpack(args)) end, function(err)
189 die(debug.traceback("LuaRocks "..cfg.program_version 190 die(debug.traceback("LuaRocks "..cfg.program_version
190 .." bug (please report at luarocks-developers@lists.sourceforge.net).\n" 191 .." bug (please report at luarocks-developers@lists.sourceforge.net).\n"
191 ..err, 2)) 192 ..err, 2))