From: Mitch Phillips Date: Thu, 7 Mar 2019 22:20:36 +0000 (+0000) Subject: [GN] Locate prebuilt binaries correctly. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fc430aca55e145818d4ad9579039f2b282eb3e01;p=llvm [GN] Locate prebuilt binaries correctly. Use the system shell to see if we can find a 'gn' binary on $PATH. This solves the error wherein subprocess.call fails ungracefully if the binary doesn't exist. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355645 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/gn/gn.py b/utils/gn/gn.py index f523e6443ea..73f2c80fe9d 100755 --- a/utils/gn/gn.py +++ b/utils/gn/gn.py @@ -38,7 +38,8 @@ def main(): # Find real gn executable. gn = 'gn' if subprocess.call([gn, '--version'], stdout=open(os.devnull, 'w'), - stderr=subprocess.STDOUT) != 0: + stderr=subprocess.STDOUT, + shell=True) != 0: # Not on path. See if get.py downloaded a prebuilt binary and run that # if it's there, or suggest to run get.py if it isn't. platform = get_platform()