aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2015-03-04 16:14:52 -0300
committerHisham Muhammad <hisham@gobolinux.org>2015-03-04 16:14:52 -0300
commit5f3d39033ecf74a6e959053548cba436ff9bfb24 (patch)
treebb1c686426d3092b370ab1821f6e03020032aec5 /src
parent46f2d252c42d5040a472cb96732b16a19d83efd3 (diff)
downloadluarocks-5f3d39033ecf74a6e959053548cba436ff9bfb24.tar.gz
luarocks-5f3d39033ecf74a6e959053548cba436ff9bfb24.tar.bz2
luarocks-5f3d39033ecf74a6e959053548cba436ff9bfb24.zip
Don't crash when asking for help on invalid cmd.
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/help.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/luarocks/help.lua b/src/luarocks/help.lua
index 0a155509..e6c214ff 100644
--- a/src/luarocks/help.lua
+++ b/src/luarocks/help.lua
@@ -100,7 +100,7 @@ function help.run(...)
100 end 100 end
101 else 101 else
102 command = command:gsub("-", "_") 102 command = command:gsub("-", "_")
103 local cmd = require(commands[command]) 103 local cmd = commands[command] and require(commands[command])
104 if cmd then 104 if cmd then
105 local arguments = cmd.help_arguments or "<argument>" 105 local arguments = cmd.help_arguments or "<argument>"
106 print_banner() 106 print_banner()