diff options
-rw-r--r-- | src/luarocks/list.lua | 5 | ||||
-rw-r--r-- | test/testing.lua | 1 | ||||
-rwxr-xr-x | test/testing.sh | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/src/luarocks/list.lua b/src/luarocks/list.lua index 71ebaf5a..22dbb721 100644 --- a/src/luarocks/list.lua +++ b/src/luarocks/list.lua | |||
@@ -93,7 +93,10 @@ function list.run(...) | |||
93 | 93 | ||
94 | local results = {} | 94 | local results = {} |
95 | for _, tree in ipairs(trees) do | 95 | for _, tree in ipairs(trees) do |
96 | search.manifest_search(results, path.rocks_dir(tree), query) | 96 | local ok, err, errcode = search.manifest_search(results, path.rocks_dir(tree), query) |
97 | if not ok then | ||
98 | return nil, err | ||
99 | end | ||
97 | end | 100 | end |
98 | util.title("Installed rocks:", flags["porcelain"]) | 101 | util.title("Installed rocks:", flags["porcelain"]) |
99 | search.print_results(results, flags["porcelain"]) | 102 | search.print_results(results, flags["porcelain"]) |
diff --git a/test/testing.lua b/test/testing.lua index b34e9ab2..8d8b3af2 100644 --- a/test/testing.lua +++ b/test/testing.lua | |||
@@ -112,6 +112,7 @@ local tests = { | |||
112 | fail_lint_invalid = function() return run "$luarocks lint invalid" end, | 112 | fail_lint_invalid = function() return run "$luarocks lint invalid" end, |
113 | fail_show_invalid = function() return run "$luarocks show invalid" end, | 113 | fail_show_invalid = function() return run "$luarocks show invalid" end, |
114 | fail_new_version_invalid = function() return run "$luarocks new_version invalid" end, | 114 | fail_new_version_invalid = function() return run "$luarocks new_version invalid" end, |
115 | fail_list_invalidtree = function() return run "$luarocks --tree=/some/invalid/tree list" end, | ||
115 | fail_inexistent_dir = function() | 116 | fail_inexistent_dir = function() |
116 | -- Unix only? | 117 | -- Unix only? |
117 | return run "mkdir idontexist; cd idontexist; rmdir ../idontexist; $luarocks; err=$?; cd ..; return $err" | 118 | return run "mkdir idontexist; cd idontexist; rmdir ../idontexist; $luarocks; err=$?; cd ..; return $err" |
diff --git a/test/testing.sh b/test/testing.sh index 45f16c0c..af2ec45e 100755 --- a/test/testing.sh +++ b/test/testing.sh | |||
@@ -367,6 +367,8 @@ fail_lint_invalid() { $luarocks lint invalid; } | |||
367 | fail_show_invalid() { $luarocks show invalid; } | 367 | fail_show_invalid() { $luarocks show invalid; } |
368 | fail_new_version_invalid() { $luarocks new_version invalid; } | 368 | fail_new_version_invalid() { $luarocks new_version invalid; } |
369 | 369 | ||
370 | fail_list_invalidtree() { $luarocks --tree=/some/invalid/tree list; } | ||
371 | |||
370 | fail_inexistent_dir() { mkdir idontexist; cd idontexist; rmdir ../idontexist; $luarocks; err=$?; cd ..; return $err; } | 372 | fail_inexistent_dir() { mkdir idontexist; cd idontexist; rmdir ../idontexist; $luarocks; err=$?; cd ..; return $err; } |
371 | 373 | ||
372 | fail_make_norockspec() { $luarocks make; } | 374 | fail_make_norockspec() { $luarocks make; } |