]> git.e2factory.org Git - e2factory.git/commitdiff
bugfix: fix error handling when passing a sourcename to ls-project
authorGordon Hecker <gh@emlix.com>
Mon, 25 Jan 2010 14:31:43 +0000 (15:31 +0100)
committerGordon Hecker <gh@emlix.com>
Fri, 12 Feb 2010 09:52:01 +0000 (10:52 +0100)
We had functionality to translate from a source to result and list
all dependencies, but that lead to ambiguous behaviour where sources
and results with the same name exist. So don't accept source names
for now.

Signed-off-by: Gordon Hecker <gh@emlix.com>
local/ls-project.lua

index c5fcb3b8d7a9db7d470451f131e4cdcf45c4852b..b27b2de7914589a575a22bc335511cb26f5c76fb 100755 (executable)
@@ -63,7 +63,11 @@ if opts.all then
   end
 elseif #opts.arguments > 0 then
   for _, r in ipairs(opts.arguments) do
-    table.insert(results, r)
+    if info.results[r] then
+      table.insert(results, r)
+    else
+      e2lib.abort(new_error("not a result: %s", r))
+    end
   end
 end
 if #results > 0 then