Skip to content

Commit

Permalink
Bug 1560193 - Always specify the Python executable to use when runnin…
Browse files Browse the repository at this point in the history
…g `./mach browsertime` r=nalexander

If `./mach browsertime` runs browsertime with a globally-installed node, due to
an existing bug in [execa][1], the wrong Python will be executed. We now
specify the full path of the Python binary we wish to use (via the `PYTHON`
environment variable that our fork of browsertime supports) and avoid this
issue altogether.

[1]: sindresorhus/execa#153

Differential Revision: https://phabricator.services.mozilla.com/D35374

UltraBlame original commit: d5f3bcfcd6bdf0245264e94e5050aa3dde799938
  • Loading branch information
marco-c committed Oct 4, 2019
1 parent eaeee46 commit 7dadcea
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions tools/browsertime/mach_commands.py
Expand Up @@ -273,12 +273,18 @@ def append_env(self, append_path=True):
node_dir = os.path.dirname(self.node_path)
path = [node_dir] + path



path = [os.path.dirname(self.virtualenv_manager.python_path)] + path

append_env = {
'PATH': os.pathsep.join(path),









'PYTHON': self.virtualenv_manager.python_path,
}

if path_to_imagemagick:
Expand Down

0 comments on commit 7dadcea

Please sign in to comment.