diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2018-07-23 10:51:07 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-07-23 10:51:07 -0300 |
commit | fa0925e382335d01f50ea26130aedc692483b8cf (patch) | |
tree | b3a9a4b966d0e6a838ed60f48b95edc1486f62f2 | |
parent | 8734df15cfd9ced9a741b0a18a4f9b508066b3df (diff) | |
download | luarocks-fa0925e382335d01f50ea26130aedc692483b8cf.tar.gz luarocks-fa0925e382335d01f50ea26130aedc692483b8cf.tar.bz2 luarocks-fa0925e382335d01f50ea26130aedc692483b8cf.zip |
cmd: report arch when crashing
-rw-r--r-- | src/luarocks/cmd.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/luarocks/cmd.lua b/src/luarocks/cmd.lua index 5af3dd95..1a4cd0e1 100644 --- a/src/luarocks/cmd.lua +++ b/src/luarocks/cmd.lua | |||
@@ -272,8 +272,15 @@ function cmd.run_command(description, commands, external_namespace, ...) | |||
272 | check_popen() | 272 | check_popen() |
273 | 273 | ||
274 | local function error_handler(err) | 274 | local function error_handler(err) |
275 | local mode = "Arch.: " .. (cfg and cfg.arch or "unknown") | ||
276 | if package.config:sub(1, 1) == "\\" then | ||
277 | if cfg and cfg.fs_use_modules then | ||
278 | mode = mode .. " (fs_use_modules = true)" | ||
279 | end | ||
280 | end | ||
275 | return debug.traceback("LuaRocks "..cfg.program_version.. | 281 | return debug.traceback("LuaRocks "..cfg.program_version.. |
276 | " bug (please report at https://github.com/luarocks/luarocks/issues).\n"..err, 2) | 282 | " bug (please report at https://github.com/luarocks/luarocks/issues).\n".. |
283 | mode.."\n"..err, 2) | ||
277 | end | 284 | end |
278 | 285 | ||
279 | --- Display an error message and exit. | 286 | --- Display an error message and exit. |