From: Tobias Ulmer Date: Wed, 8 May 2013 16:21:10 +0000 (+0200) Subject: Adjust callers of e2lib.callcmd_pipe() X-Git-Tag: e2factory-2.3.15rc1~503 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=6dc17d3e895220ecdbfddb7092636e2e5343a403;p=e2factory.git Adjust callers of e2lib.callcmd_pipe() Signed-off-by: Tobias Ulmer --- diff --git a/local/git.lua b/local/git.lua index f4fbe40..ba66120 100644 --- a/local/git.lua +++ b/local/git.lua @@ -307,8 +307,8 @@ function git.prepare_source(info, sourcename, sourceset, buildpath) e2lib.shquote(gitdir), e2lib.shquote(sourcename), e2lib.shquote(src.branch)) local tar = string.format("tar -C %s -xf -", e2lib.shquote(buildpath)) - local re = e2lib.callcmd_pipe({git, tar}) - if re then + rc, re = e2lib.callcmd_pipe({git, tar}) + if not rc then return false, e:cat(re) end elseif sourceset == "tag" or @@ -322,8 +322,8 @@ function git.prepare_source(info, sourcename, sourceset, buildpath) "git archive --format=tar --prefix=%s/ refs/tags/%s", e2lib.shquote(gitdir), e2lib.shquote(sourcename), e2lib.shquote(src.tag)) local tar = string.format("tar -C %s -xf -", e2lib.shquote(buildpath)) - local re = e2lib.callcmd_pipe({git, tar}) - if re then + rc, re = e2lib.callcmd_pipe({git, tar}) + if not rc then return false, e:cat(re) end elseif sourceset == "working-copy" then @@ -346,9 +346,9 @@ function git.prepare_source(info, sourcename, sourceset, buildpath) e2lib.shquote(src.working)) local cmd2 = string.format("%s %s -x -C %s/%s", e2lib.shquote(tar), tarflags, e2lib.shquote(buildpath), e2lib.shquote(sourcename)) - local r = e2lib.callcmd_pipe({ cmd1, cmd2 }) - if r then - return false, err.new("%s", r) + rc, re = e2lib.callcmd_pipe({ cmd1, cmd2 }) + if not rc then + return false, e:cat(re) end else return false, err.new("invalid sourceset: %s", sourceset)