autobuild: cwd is needed on all command types
[kai/samba.git] / script / autobuild.py
index be8006c3245d80ae516bd5f91cf43f2c1dcaa5a4..4e3bc5101f0eed70a9eafed026c0f357d80bdade 100755 (executable)
@@ -78,9 +78,9 @@ def run_cmd(cmd, dir=".", show=None, output=False, checkfail=True):
     if output:
         return Popen([cmd], shell=True, stdout=PIPE, cwd=dir).communicate()[0]
     elif checkfail:
-        return check_call(cmd, shell=True)
+        return check_call(cmd, shell=True, cwd=dir)
     else:
-        return call(cmd, shell=True)
+        return call(cmd, shell=True, cwd=dir)
 
 
 class builder(object):