diff options
-rw-r--r-- | src/luarocks/cmd/which.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/luarocks/cmd/which.lua b/src/luarocks/cmd/which.lua index 0116fdb8..89e6db56 100644 --- a/src/luarocks/cmd/which.lua +++ b/src/luarocks/cmd/which.lua | |||
@@ -17,6 +17,9 @@ that module by luarocks.loader, like "/usr/local/lua/]]..cfg.lua_version..[[/foo | |||
17 | --- Driver function for "lua" command. | 17 | --- Driver function for "lua" command. |
18 | -- @return boolean This function terminates the interpreter. | 18 | -- @return boolean This function terminates the interpreter. |
19 | function which_cmd.command(_, modname) | 19 | function which_cmd.command(_, modname) |
20 | if modname == nil then | ||
21 | return nil, "Missing module name. " .. util.see_help("which") | ||
22 | end | ||
20 | local pathname, rock_name, rock_version = loader.which(modname) | 23 | local pathname, rock_name, rock_version = loader.which(modname) |
21 | if not pathname then | 24 | if not pathname then |
22 | return nil, "Module '" .. modname .. "' not found by luarocks.loader." | 25 | return nil, "Module '" .. modname .. "' not found by luarocks.loader." |