From: Tobias Ulmer Date: Tue, 25 Mar 2014 16:34:07 +0000 (+0100) Subject: Forbid --all with results and --wc-mode without results X-Git-Tag: e2factory-2.3.14p0~2 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=9f7feddc8dd38bf463e5e6432de38f5d1e99b4f4;p=e2factory.git Forbid --all with results and --wc-mode without results Signed-off-by: Tobias Ulmer --- diff --git a/local/e2-build.lua b/local/e2-build.lua index 2d7e817..7879561 100644 --- a/local/e2-build.lua +++ b/local/e2-build.lua @@ -113,7 +113,10 @@ end -- handle result selection local results = {} -if opts["all"] then + +if opts["all"] and #arguments ~= 0 then + e2lib.abort("--all with additional results does not make sense") +elseif opts["all"] then for r,_ in pairs(info.results) do table.insert(results, r) end @@ -134,6 +137,9 @@ if opts["branch-mode"] then build_mode = policy.default_build_mode("branch") end if opts["wc-mode"] then + if #results == 0 then + e2lib.abort("--wc-mode requires one or more results") + end build_mode = policy.default_build_mode("working-copy") end local playground = opts["playground"]