Bug 1545344 - Don't change current directory when executing a command via run-task. r=tomprince
authorMike Hommey <mh+mozilla@glandium.org>
Sat, 27 Apr 2019 21:51:53 +0000
changeset 530490 ebe9a3ca4b176813d77aa2ec5acfef362dce153e
parent 530489 4c994bf995693ce3daee5adb5097608c8bb800da
child 530491 a584e4e9473fd33a2d97fd4da72facb53e0dd53e
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstomprince
bugs1545344
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1545344 - Don't change current directory when executing a command via run-task. r=tomprince Currently, all things running via run-task don't really care that the current directory is set to /. However, on generic-worker, many things assume the current directory is the task directory, which varies by task, and wrapping them with run-task fails because it resets the current directory. Differential Revision: https://phabricator.services.mozilla.com/D28018
taskcluster/scripts/run-task
--- a/taskcluster/scripts/run-task
+++ b/taskcluster/scripts/run-task
@@ -131,17 +131,16 @@ def run_and_prefix_output(prefix, args, 
     p = subprocess.Popen(args,
                          # Disable buffering because we want to receive output
                          # as it is generated so timestamps in logs are
                          # accurate.
                          bufsize=0,
                          stdout=subprocess.PIPE,
                          stderr=subprocess.STDOUT,
                          stdin=sys.stdin.fileno(),
-                         cwd='/',
                          env=env)
 
     stdout = io.TextIOWrapper(p.stdout, encoding='latin1')
 
     while True:
         data = stdout.readline().encode('latin1')
 
         if data == b'':