diff options
author | V1K1NGbg <victor@ilchev.com> | 2024-08-12 15:37:30 +0300 |
---|---|---|
committer | V1K1NGbg <victor@ilchev.com> | 2024-08-12 15:37:30 +0300 |
commit | d822c9375552013830006cf07bcf4bdc2b83876f (patch) | |
tree | 400194b2d18693140c347b502d270a3339bfa3f2 | |
parent | 78ad5950c57ebe805274e61ce32d8f2cbcc86000 (diff) | |
download | luarocks-d822c9375552013830006cf07bcf4bdc2b83876f.tar.gz luarocks-d822c9375552013830006cf07bcf4bdc2b83876f.tar.bz2 luarocks-d822c9375552013830006cf07bcf4bdc2b83876f.zip |
deplocks small fix
-rw-r--r-- | src/luarocks/deplocks.lua | 8 | ||||
-rw-r--r-- | src/luarocks/deplocks.tl | 7 |
2 files changed, 11 insertions, 4 deletions
diff --git a/src/luarocks/deplocks.lua b/src/luarocks/deplocks.lua index 9ad7fe7a..cfe61e53 100644 --- a/src/luarocks/deplocks.lua +++ b/src/luarocks/deplocks.lua | |||
@@ -7,6 +7,7 @@ local persist = require("luarocks.persist") | |||
7 | 7 | ||
8 | 8 | ||
9 | 9 | ||
10 | |||
10 | local deptable = {} | 11 | local deptable = {} |
11 | local deptable_mode = "start" | 12 | local deptable_mode = "start" |
12 | local deplock_abs_filename | 13 | local deplock_abs_filename |
@@ -77,8 +78,11 @@ function deplocks.get(depskey, name) | |||
77 | if not dk then | 78 | if not dk then |
78 | return nil | 79 | return nil |
79 | end | 80 | end |
80 | 81 | if type(dk) == "table" then | |
81 | return dk[name] | 82 | return dk[name] |
83 | else | ||
84 | return dk | ||
85 | end | ||
82 | end | 86 | end |
83 | 87 | ||
84 | function deplocks.write_file() | 88 | function deplocks.write_file() |
diff --git a/src/luarocks/deplocks.tl b/src/luarocks/deplocks.tl index b91f347d..494db3a9 100644 --- a/src/luarocks/deplocks.tl +++ b/src/luarocks/deplocks.tl | |||
@@ -78,8 +78,11 @@ function deplocks.get(depskey: string, name: string): string | number | boolean | |||
78 | if not dk then | 78 | if not dk then |
79 | return nil | 79 | return nil |
80 | end | 80 | end |
81 | 81 | if dk is PersistableTable then | |
82 | return dk[name] | 82 | return dk[name] |
83 | else | ||
84 | return dk | ||
85 | end | ||
83 | end | 86 | end |
84 | 87 | ||
85 | function deplocks.write_file(): boolean, string | 88 | function deplocks.write_file(): boolean, string |