]> git.e2factory.org Git - e2factory.git/commitdiff
No need for chdir in fetch-project
authorTobias Ulmer <tu@emlix.com>
Wed, 4 Dec 2013 15:14:03 +0000 (16:14 +0100)
committerTobias Ulmer <tu@emlix.com>
Wed, 16 Nov 2016 14:41:17 +0000 (15:41 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
global/e2-fetch-project.lua

index 8f89971a6990aa04f7986e242a2bc43bb58a0565..833ea45102de50eee8e2343de6ba327b13c83493 100644 (file)
@@ -119,7 +119,7 @@ local function e2_fetch_project(arg)
 
     local location = string.format("%s/version", p.location)
     local rc, re = cache.fetch_file(scache, p.server, location, tmpdir, nil,
-    { cache = false })
+        { cache = false })
     if not rc then
         return false, e:cat(re)
     end
@@ -148,8 +148,6 @@ local function e2_fetch_project(arg)
         return false, e:cat(re)
     end
 
-    e2lib.chdir(p.destdir)
-
     -- checkout the desired branch, if a branch was given
     if p.branch then
         local id
@@ -227,7 +225,7 @@ local function e2_fetch_project(arg)
     end
 
     -- call e2-install-e2
-    rc, re = e2lib.callcmd_log(e2_install_e2)
+    rc, re = e2lib.callcmd_log(e2_install_e2, p.destdir)
     if not rc or rc ~= 0 then
         local e = err.new("installing local e2 failed")
         return false, e:cat(re)