diff options
author | V1K1NGbg <victor@ilchev.com> | 2024-07-13 00:58:28 +0300 |
---|---|---|
committer | V1K1NGbg <victor@ilchev.com> | 2024-08-05 20:49:17 +0300 |
commit | 0da4377efd0ead57548bdb708792db8542a0b53e (patch) | |
tree | fa5f02e13cdd0462d9118220d6e619f410e21685 | |
parent | 61976586cebcbfbd69db83342bc9f96e9454b08c (diff) | |
download | luarocks-0da4377efd0ead57548bdb708792db8542a0b53e.tar.gz luarocks-0da4377efd0ead57548bdb708792db8542a0b53e.tar.bz2 luarocks-0da4377efd0ead57548bdb708792db8542a0b53e.zip |
test .repository
-rw-r--r-- | src/luarocks/core/manif.lua | 6 | ||||
-rw-r--r-- | src/luarocks/core/manif.tl | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/luarocks/core/manif.lua b/src/luarocks/core/manif.lua index 197b4725..c64795dc 100644 --- a/src/luarocks/core/manif.lua +++ b/src/luarocks/core/manif.lua | |||
@@ -49,8 +49,8 @@ local manifest_cache = {} | |||
49 | 49 | ||
50 | function manif.cache_manifest(repo_url, lua_version, manifest) | 50 | function manif.cache_manifest(repo_url, lua_version, manifest) |
51 | lua_version = lua_version or cfg.lua_version | 51 | lua_version = lua_version or cfg.lua_version |
52 | manifest_cache[repo_url] = manifest_cache[repo_url] or {} | 52 | manifest_cache.repository[repo_url] = manifest_cache.repository[repo_url] or {} |
53 | manifest_cache[repo_url][lua_version] = manifest | 53 | manifest_cache.repository[repo_url][lua_version] = manifest |
54 | end | 54 | end |
55 | 55 | ||
56 | 56 | ||
@@ -59,7 +59,7 @@ end | |||
59 | 59 | ||
60 | function manif.get_cached_manifest(repo_url, lua_version) | 60 | function manif.get_cached_manifest(repo_url, lua_version) |
61 | lua_version = lua_version or cfg.lua_version | 61 | lua_version = lua_version or cfg.lua_version |
62 | return manifest_cache[repo_url] and manifest_cache[repo_url][lua_version] | 62 | return manifest_cache.repository[repo_url] and manifest_cache.repository[repo_url][lua_version] |
63 | end | 63 | end |
64 | 64 | ||
65 | 65 | ||
diff --git a/src/luarocks/core/manif.tl b/src/luarocks/core/manif.tl index 503fc2e5..a1c84995 100644 --- a/src/luarocks/core/manif.tl +++ b/src/luarocks/core/manif.tl | |||
@@ -49,8 +49,8 @@ local manifest_cache: Manifest = {} | |||
49 | -- @param manifest table: the manifest to be cached. | 49 | -- @param manifest table: the manifest to be cached. |
50 | function manif.cache_manifest(repo_url: string, lua_version: string, manifest: Manifest) | 50 | function manif.cache_manifest(repo_url: string, lua_version: string, manifest: Manifest) |
51 | lua_version = lua_version or cfg.lua_version | 51 | lua_version = lua_version or cfg.lua_version |
52 | manifest_cache[repo_url] = manifest_cache[repo_url] or {} | 52 | manifest_cache.repository[repo_url] = manifest_cache.repository[repo_url] or {} |
53 | manifest_cache[repo_url][lua_version] = manifest | 53 | manifest_cache.repository[repo_url][lua_version] = manifest |
54 | end | 54 | end |
55 | 55 | ||
56 | --- Attempt to get cached loaded manifest. | 56 | --- Attempt to get cached loaded manifest. |
@@ -59,7 +59,7 @@ end | |||
59 | -- @return table or nil: loaded manifest or nil if cache is empty. | 59 | -- @return table or nil: loaded manifest or nil if cache is empty. |
60 | function manif.get_cached_manifest(repo_url: string, lua_version: string): Manifest | 60 | function manif.get_cached_manifest(repo_url: string, lua_version: string): Manifest |
61 | lua_version = lua_version or cfg.lua_version | 61 | lua_version = lua_version or cfg.lua_version |
62 | return manifest_cache[repo_url] and manifest_cache[repo_url][lua_version] | 62 | return manifest_cache.repository[repo_url] and manifest_cache.repository[repo_url][lua_version] |
63 | end | 63 | end |
64 | 64 | ||
65 | --- Back-end function that actually loads the manifest | 65 | --- Back-end function that actually loads the manifest |
@@ -84,7 +84,7 @@ end | |||
84 | -- @param repo_url string: URL or pathname for the repository. | 84 | -- @param repo_url string: URL or pathname for the repository. |
85 | -- @return table or (nil, string, string): A table representing the manifest, | 85 | -- @return table or (nil, string, string): A table representing the manifest, |
86 | -- or nil followed by an error message and an error code, see manifest_loader. | 86 | -- or nil followed by an error message and an error code, see manifest_loader. |
87 | function manif.fast_load_local_manifest(repo_url: string): Manifest | nil, string, string | 87 | function manif.fast_load_local_manifest(repo_url: string): Manifest, string | {any: any}, string |
88 | assert(type(repo_url) == "string") | 88 | assert(type(repo_url) == "string") |
89 | 89 | ||
90 | local cached_manifest = manif.get_cached_manifest(repo_url) | 90 | local cached_manifest = manif.get_cached_manifest(repo_url) |