servo: Merge #11391 - mach: Redirect stderr to /dev/null when locating Python binary (from perlun:fix/be-more-quiet-when-finding-python-binary); r=mbrubeck
authorPer Lundberg <per.lundberg@ecraft.com>
Thu, 26 May 2016 04:16:42 -0500
changeset 387901 74ffb4163f720d00a09055d167a7d6b49056fb83
parent 387900 5dd20a97a1ccdc7b3c6484d867b607abb51906cf
child 387902 fd119bfd4abfe2fc2f7dfed6201315d73f7e09d4
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmbrubeck
servo: Merge #11391 - mach: Redirect stderr to /dev/null when locating Python binary (from perlun:fix/be-more-quiet-when-finding-python-binary); r=mbrubeck - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy --faster` does not report any errors - [X] These changes do not require tests because it only changes the mach build script ---- We already redirect stdout in `mach`, but the problem is that (at least on Windows/MSYS2), the `which` command tends to output things to stderr when failing: ``` $ ./mach build -d which: no python2.7 in (/usr/local/bin:/usr/bin:/bin:/opt/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/c/Program Files/Java/jdk1.8.0_66/bin:/c/Python27:/c/Python27/Scripts) ``` This PR silences this noise. Source-Repo: https://github.com/servo/servo Source-Revision: 7dea7ace1b97ce8a51ab0b0516b8705474213542
servo/mach
--- a/servo/mach
+++ b/servo/mach
@@ -1,17 +1,17 @@
 #!/bin/sh
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 # The beginning of this script is both valid shell and valid python,
 # such that the script starts with the shell and is reexecuted with
 # the right python.
-'''which' python2.7 > /dev/null && exec python2.7 "$0" "$@" || exec python "$0" "$@"
+'''which' python2.7 > /dev/null 2> /dev/null && exec python2.7 "$0" "$@" || exec python "$0" "$@"
 '''
 
 from __future__ import print_function, unicode_literals
 
 import os
 import sys
 
 def main(args):