diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2024-02-17 03:21:19 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2024-02-17 13:33:49 -0300 |
commit | 0931933acc19ba7aff11afe7a1f9d52929ca0d43 (patch) | |
tree | 41e0ffae5c27f79235ae73dcc33373172e5c993d | |
parent | 7868575fd26da8b50384f9203b8a548ae35e5543 (diff) | |
download | luarocks-0931933acc19ba7aff11afe7a1f9d52929ca0d43.tar.gz luarocks-0931933acc19ba7aff11afe7a1f9d52929ca0d43.tar.bz2 luarocks-0931933acc19ba7aff11afe7a1f9d52929ca0d43.zip |
fix: catch the failure to setup LUA_BINDIR early.
Fixes #1202.
-rw-r--r-- | src/luarocks/cmd.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/luarocks/cmd.lua b/src/luarocks/cmd.lua index 2db0c039..250e3cff 100644 --- a/src/luarocks/cmd.lua +++ b/src/luarocks/cmd.lua | |||
@@ -674,6 +674,12 @@ function cmd.run_command(description, commands, external_namespace, ...) | |||
674 | os.exit(cmd.errorcodes.OK) | 674 | os.exit(cmd.errorcodes.OK) |
675 | end | 675 | end |
676 | 676 | ||
677 | if not cfg.variables["LUA_BINDIR"] then | ||
678 | return nil, "LUA_BINDIR not configured.\n" .. | ||
679 | "Please configure the location of the Lua interpreter with:\n" .. | ||
680 | " luarocks config variables.LUA_BINDIR <path>" | ||
681 | end | ||
682 | |||
677 | local cmd_mod = cmd_modules[args.command] | 683 | local cmd_mod = cmd_modules[args.command] |
678 | 684 | ||
679 | local lock | 685 | local lock |