]> git.e2factory.org Git - e2factory.git/commitdiff
bugfix in e2-fetch-project: pass failure in e2-install-e2 to the user
authorGordon Hecker <gh@emlix.com>
Wed, 27 May 2009 14:13:46 +0000 (16:13 +0200)
committerGordon Hecker <gh@emlix.com>
Wed, 27 May 2009 14:13:46 +0000 (16:13 +0200)
Signed-off-by: Gordon Hecker <gh@emlix.com>
global/e2-fetch-project.lua.in

index 4f24f1c118463903d9a570467e15f613a11b8bd7..d1088887495c0e2564d2eebe33c197e04d05b76c 100755 (executable)
@@ -174,18 +174,17 @@ end
 -- write project location file
 local file = ".e2/project-location"
 local data = string.format("%s\n", p.location)
-local rc, e = e2lib.write_file(file, data)
+local rc, re = e2lib.write_file(file, data)
 if not rc then
-  e2lib.abort(e)
+  e2lib.abort(e:cat(re))
 end
 
 -- call e2-install-e2
 e2_install_e2 = string.format("'%s' '%s/e2-install-e2'", 
                        buildconfig.LUA, buildconfig.TOOLDIR)
 rc, re = e2lib.callcmd_log(e2_install_e2)
-if not rc then
-       e:append("installing local e2 failed")
-       e2lib.abort(e:cat(re))
+if rc ~= 0 then
+       e2lib.abort(new_error("installing local e2 failed"))
 end
 e2lib.finish()