diff options
author | V1K1NGbg <victor@ilchev.com> | 2024-08-22 17:49:02 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2024-10-21 13:30:51 -0300 |
commit | cc5723ecad8db0b1ffbd4c85d265d54287e0c732 (patch) | |
tree | 551ddc36d956e25bd663ca1cf25326b43702d819 | |
parent | c7feb0191ffbc1155e176fdb5356128e58595755 (diff) | |
download | luarocks-cc5723ecad8db0b1ffbd4c85d265d54287e0c732.tar.gz luarocks-cc5723ecad8db0b1ffbd4c85d265d54287e0c732.tar.bz2 luarocks-cc5723ecad8db0b1ffbd4c85d265d54287e0c732.zip |
Teal: convert luarocks.cmd.path
-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. |
4 | local path_cmd = {} | 4 | local record path_cmd |
5 | end | ||
5 | 6 | ||
6 | local util = require("luarocks.util") | 7 | local util = require("luarocks.util") |
7 | local cfg = require("luarocks.core.cfg") | 8 | local cfg = require("luarocks.core.cfg") |
8 | local fs = require("luarocks.fs") | 9 | local fs = require("luarocks.fs") |
9 | 10 | ||
10 | function path_cmd.add_to_parser(parser) | 11 | local type Parser = require("luarocks.vendor.argparse").Parser |
12 | |||
13 | local type Args = require("luarocks.core.types.args").Args | ||
14 | |||
15 | function path_cmd.add_to_parser(parser: Parser) | ||
11 | local cmd = parser:command("path", [[ | 16 | local cmd = parser:command("path", [[ |
12 | Returns the package path currently configured for this installation | 17 | Returns the package path currently configured for this installation |
13 | of LuaRocks, formatted as shell commands to update LUA_PATH and LUA_CPATH. | 18 | of 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. |
41 | function path_cmd.command(args) | 46 | function 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 | ||