diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2018-06-20 19:39:52 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-06-20 20:21:56 -0300 |
commit | 7037d5e3898441f1383e7684aaa89ee4c0fc8477 (patch) | |
tree | b098cf8e32ae3cd3f98efe3c9db796b55e74551a /src | |
parent | 010b42ff0949c9e5ad56809389340b3c25abc3a9 (diff) | |
download | luarocks-7037d5e3898441f1383e7684aaa89ee4c0fc8477.tar.gz luarocks-7037d5e3898441f1383e7684aaa89ee4c0fc8477.tar.bz2 luarocks-7037d5e3898441f1383e7684aaa89ee4c0fc8477.zip |
rockspecs: propagate failure when parsing dependencies
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/rockspecs.lua | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/luarocks/rockspecs.lua b/src/luarocks/rockspecs.lua index 373f6caa..e9fb73be 100644 --- a/src/luarocks/rockspecs.lua +++ b/src/luarocks/rockspecs.lua | |||
@@ -57,6 +57,7 @@ local function convert_dependencies(rockspec, key) | |||
57 | else | 57 | else |
58 | rockspec[key] = {} | 58 | rockspec[key] = {} |
59 | end | 59 | end |
60 | return true | ||
60 | end | 61 | end |
61 | 62 | ||
62 | --- Set up path-related variables for a given rock. | 63 | --- Set up path-related variables for a given rock. |
@@ -145,9 +146,12 @@ function rockspecs.from_persisted_table(filename, rockspec, globals, quick) | |||
145 | and cfg.rocks_provided_3_0 | 146 | and cfg.rocks_provided_3_0 |
146 | or cfg.rocks_provided) | 147 | or cfg.rocks_provided) |
147 | 148 | ||
148 | convert_dependencies(rockspec, "dependencies") | 149 | for _, key in ipairs({"dependencies", "build_dependencies", "test_dependencies"}) do |
149 | convert_dependencies(rockspec, "build_dependencies") | 150 | local ok, err = convert_dependencies(rockspec, key) |
150 | convert_dependencies(rockspec, "test_dependencies") | 151 | if not ok then |
152 | return nil, err | ||
153 | end | ||
154 | end | ||
151 | 155 | ||
152 | if not quick then | 156 | if not quick then |
153 | configure_paths(rockspec) | 157 | configure_paths(rockspec) |