Thinko in previous.
authorCarl Hetherington <cth@carlh.net>
Thu, 3 Oct 2019 22:06:42 +0000 (00:06 +0200)
committerCarl Hetherington <cth@carlh.net>
Thu, 3 Oct 2019 22:06:42 +0000 (00:06 +0200)
cdist

diff --git a/cdist b/cdist
index 751be982baa931a86d4ebe10c0bec351c9c992ff..d326430f5a8cf396093cca86869007e89cb09270 100755 (executable)
--- a/cdist
+++ b/cdist
@@ -535,8 +535,8 @@ class DockerTarget(Target):
         if config.get('docker_no_user'):
             user = ''
         else:
-            user = '-t %s' % getpass.getuser()
-        command('%s exec -u %s %s /bin/bash -c \'export %s; cd %s; %s\'' % (config.docker(), user, self.container, self.variables_string(), dir, cmd))
+            user = '-u %s' % getpass.getuser()
+        command('%s exec %s -t %s /bin/bash -c \'export %s; cd %s; %s\'' % (config.docker(), user, self.container, self.variables_string(), dir, cmd))
 
     def cleanup(self):
         super(DockerTarget, self).cleanup()