diff options
author | V1K1NGbg <victor@ilchev.com> | 2024-08-22 17:49:04 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2024-10-21 13:30:51 -0300 |
commit | d9e3df1be0776eb82525ec76c0b450d1621ed2dc (patch) | |
tree | 7025f00253cac94c6bf53303dbf742c28f959282 /src | |
parent | 844c9ea201500e0b5fe8bb833a7468605690bc7c (diff) | |
download | luarocks-d9e3df1be0776eb82525ec76c0b450d1621ed2dc.tar.gz luarocks-d9e3df1be0776eb82525ec76c0b450d1621ed2dc.tar.bz2 luarocks-d9e3df1be0776eb82525ec76c0b450d1621ed2dc.zip |
Teal: convert luarocks.fetch.git_ssh
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/fetch/git_ssh.tl (renamed from src/luarocks/fetch/git_ssh.lua) | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/luarocks/fetch/git_ssh.lua b/src/luarocks/fetch/git_ssh.tl index 0c2c0750..b5c30e3a 100644 --- a/src/luarocks/fetch/git_ssh.lua +++ b/src/luarocks/fetch/git_ssh.tl | |||
@@ -7,10 +7,13 @@ | |||
7 | -- It also handles scp-style ssh urls: git@example.com:path/foo.git, | 7 | -- It also handles scp-style ssh urls: git@example.com:path/foo.git, |
8 | -- but you have to prepend the "git+ssh://" and why not use the "newer" | 8 | -- but you have to prepend the "git+ssh://" and why not use the "newer" |
9 | -- style anyway? | 9 | -- style anyway? |
10 | local git_ssh = {} | 10 | local record git_ssh |
11 | end | ||
11 | 12 | ||
12 | local git = require("luarocks.fetch.git") | 13 | local git = require("luarocks.fetch.git") |
13 | 14 | ||
15 | local type Rockspec = require("luarocks.core.types.rockspec").Rockspec | ||
16 | |||
14 | --- Fetch sources for building a rock from a local Git repository. | 17 | --- Fetch sources for building a rock from a local Git repository. |
15 | -- @param rockspec table: The rockspec table | 18 | -- @param rockspec table: The rockspec table |
16 | -- @param extract boolean: Unused in this module (required for API purposes.) | 19 | -- @param extract boolean: Unused in this module (required for API purposes.) |
@@ -18,7 +21,7 @@ local git = require("luarocks.fetch.git") | |||
18 | -- @return (string, string) or (nil, string): The absolute pathname of | 21 | -- @return (string, string) or (nil, string): The absolute pathname of |
19 | -- the fetched source tarball and the temporary directory created to | 22 | -- the fetched source tarball and the temporary directory created to |
20 | -- store it; or nil and an error message. | 23 | -- store it; or nil and an error message. |
21 | function git_ssh.get_sources(rockspec, extract, dest_dir) | 24 | function git_ssh.get_sources(rockspec: Rockspec, extract: boolean, dest_dir?: string): string, string |
22 | rockspec.source.url = rockspec.source.url:gsub("^git.", "") | 25 | rockspec.source.url = rockspec.source.url:gsub("^git.", "") |
23 | 26 | ||
24 | -- Handle old-style scp-like git ssh urls | 27 | -- Handle old-style scp-like git ssh urls |