diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2019-03-14 17:10:17 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2019-03-14 21:20:57 -0300 |
commit | f54728bef1d4d829845ecad8d802d46b9df519c0 (patch) | |
tree | d5179f04c60255658e4c7ba23959405c365d075f /src | |
parent | 63c5635f17b8a3d240283166462d9a02935e6750 (diff) | |
download | luarocks-f54728bef1d4d829845ecad8d802d46b9df519c0.tar.gz luarocks-f54728bef1d4d829845ecad8d802d46b9df519c0.tar.bz2 luarocks-f54728bef1d4d829845ecad8d802d46b9df519c0.zip |
cmd: be more lenient when --lua-version can't find an interpreter
This will still allow things like `luarocks list` and
`luarocks search` to work.
Diffstat (limited to 'src')
-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 d7201084..ff6abf3d 100644 --- a/src/luarocks/cmd.lua +++ b/src/luarocks/cmd.lua | |||
@@ -405,7 +405,14 @@ function cmd.run_command(description, commands, external_namespace, ...) | |||
405 | end | 405 | end |
406 | end | 406 | end |
407 | if not lua_data then | 407 | if not lua_data then |
408 | die("Could not find a Lua interpreter for version " .. flags["lua-version"] .. " in your PATH") | 408 | util.warning("Could not find a Lua interpreter for version " .. |
409 | flags["lua-version"] .. " in your PATH. " .. | ||
410 | "Modules may not install with the correct configurations. " .. | ||
411 | "You may want to specify to the path prefix to your build " .. | ||
412 | "of Lua " .. flags["lua-version"] .. " using --lua-dir") | ||
413 | lua_data = { | ||
414 | lua_version = flags["lua-version"], | ||
415 | } | ||
409 | end | 416 | end |
410 | elseif project_dir then | 417 | elseif project_dir then |
411 | lua_data = find_lua_version_at(project_dir) | 418 | lua_data = find_lua_version_at(project_dir) |