Patchwork setup: fix runcmd() usage on darwin

login
register
mail settings
Submitter Adam Simpkins
Date June 28, 2017, 6:13 p.m.
Message ID <649cb52c8cd94ab98068.1498673633@devbig125.prn1.facebook.com>
Download mbox | patch
Permalink /patch/21802/
State Accepted
Headers show

Comments

Adam Simpkins - June 28, 2017, 6:13 p.m.
# HG changeset patch
# User Adam Simpkins <simpkins@fb.com>
# Date 1498672237 25200
#      Wed Jun 28 10:50:37 2017 -0700
# Node ID 649cb52c8cd94ab98068004e40bf9947de62a0ce
# Parent  6ef5f0c95d643d114262f8c6689a6fc02adb0da7
setup: fix runcmd() usage on darwin

Fix one invocation of runcmd() that was missed in the recent change to
make runcmd() also return the process exit status.
Augie Fackler - June 28, 2017, 9:44 p.m.
On Wed, Jun 28, 2017 at 11:13:53AM -0700, Adam Simpkins wrote:
> # HG changeset patch
> # User Adam Simpkins <simpkins@fb.com>
> # Date 1498672237 25200
> #      Wed Jun 28 10:50:37 2017 -0700
> # Node ID 649cb52c8cd94ab98068004e40bf9947de62a0ce
> # Parent  6ef5f0c95d643d114262f8c6689a6fc02adb0da7
> setup: fix runcmd() usage on darwin

queued, thanks

Patch

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -814,7 +814,7 @@ 
     setupversion = version.split('+', 1)[0]
 
 if sys.platform == 'darwin' and os.path.exists('/usr/bin/xcodebuild'):
-    version = runcmd(['/usr/bin/xcodebuild', '-version'], {})[0].splitlines()
+    version = runcmd(['/usr/bin/xcodebuild', '-version'], {})[1].splitlines()
     if version:
         version = version[0]
         if sys.version_info[0] == 3: