aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/luarocks/cmd/path.tl (renamed from src/luarocks/cmd/path.lua)11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/luarocks/cmd/path.lua b/src/luarocks/cmd/path.tl
index ba346550..998aa222 100644
--- a/src/luarocks/cmd/path.lua
+++ b/src/luarocks/cmd/path.tl
@@ -1,13 +1,18 @@
1 1
2--- @module luarocks.path_cmd 2--- @module luarocks.path_cmd
3-- Driver for the `luarocks path` command. 3-- Driver for the `luarocks path` command.
4local path_cmd = {} 4local record path_cmd
5end
5 6
6local util = require("luarocks.util") 7local util = require("luarocks.util")
7local cfg = require("luarocks.core.cfg") 8local cfg = require("luarocks.core.cfg")
8local fs = require("luarocks.fs") 9local fs = require("luarocks.fs")
9 10
10function path_cmd.add_to_parser(parser) 11local type Parser = require("luarocks.vendor.argparse").Parser
12
13local type Args = require("luarocks.core.types.args").Args
14
15function path_cmd.add_to_parser(parser: Parser)
11 local cmd = parser:command("path", [[ 16 local cmd = parser:command("path", [[
12Returns the package path currently configured for this installation 17Returns the package path currently configured for this installation
13of LuaRocks, formatted as shell commands to update LUA_PATH and LUA_CPATH. 18of LuaRocks, formatted as shell commands to update LUA_PATH and LUA_CPATH.
@@ -38,7 +43,7 @@ end
38 43
39--- Driver function for "path" command. 44--- Driver function for "path" command.
40-- @return boolean This function always succeeds. 45-- @return boolean This function always succeeds.
41function path_cmd.command(args) 46function path_cmd.command(args: Args): boolean, string
42 local lr_path, lr_cpath, lr_bin = cfg.package_paths(args.tree) 47 local lr_path, lr_cpath, lr_bin = cfg.package_paths(args.tree)
43 local path_sep = cfg.export_path_separator 48 local path_sep = cfg.export_path_separator
44 49