]> git.e2factory.org Git - e2factory.git/commitdiff
Use ssh_remote_cmd() to create directory
authorTobias Ulmer <tu@emlix.com>
Wed, 30 Oct 2013 19:06:30 +0000 (20:06 +0100)
committerTobias Ulmer <tu@emlix.com>
Wed, 16 Nov 2016 14:01:23 +0000 (15:01 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
generic/transport.lua

index 7fd5a078c264633d11a44532298f4fc6c3d5b460..969db7af7b382566537e98de87cb6ce2e6904fd1 100644 (file)
@@ -361,12 +361,11 @@ function transport.push_file(sourcefile, durl, location, push_permissions, try_h
             user = string.format("%s@", u.user)
         end
 
-        local argv = { user..u.servername, "mkdir", "-p",
-        e2lib.shquote(destdir) }
-        rc, re = e2lib.ssh(argv)
+        rc, re = e2lib.ssh_remote_cmd(u, { "mkdir", "-p", destdir })
         if not rc then
             return false, re
         end
+
         local destserv = string.format("%s%s:", user, u.servername)
         local destfile = string.format("%s/%s", destdir, destname)
         destfile = e2lib.shquote(destfile)