| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 6f31478 commit 1e9d3e6
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -495,7 +495,7 @@ def _GetSdkVersionInfoItem(self, sdk, infoitem): | |||
| 495 | 495 | # Since the CLT has no SDK paths anyway, returning None is the | |
| 496 | 496 | # most sensible route and should still do the right thing. | |
| 497 | 497 | try: | |
| 498 | - return GetStdout(['xcrun', '--sdk', sdk, infoitem]) | ||
| 498 | + return GetStdoutQuiet(['xcrun', '--sdk', sdk, infoitem]) | ||
| 499 | 499 | except: | |
| 500 | 500 | pass | |
| 501 | 501 | ||
@@ -1394,7 +1394,7 @@ def XcodeVersion(): | |||
| 1394 | 1394 | if XCODE_VERSION_CACHE: | |
| 1395 | 1395 | return XCODE_VERSION_CACHE | |
| 1396 | 1396 | try: | |
| 1397 | - version_list = GetStdout(['xcodebuild', '-version']).splitlines() | ||
| 1397 | + version_list = GetStdoutQuiet(['xcodebuild', '-version']).splitlines() | ||
| 1398 | 1398 | # In some circumstances xcodebuild exits 0 but doesn't return | |
| 1399 | 1399 | # the right results; for example, a user on 10.7 or 10.8 with | |
| 1400 | 1400 | # a bogus path set via xcode-select | |
@@ -1444,6 +1444,18 @@ def CLTVersion(): | |||
| 1444 | 1444 | continue | |
| 1445 | 1445 | ||
| 1446 | 1446 | ||
| 1447 | + def GetStdoutQuiet(cmdlist): | ||
| 1448 | + """Returns the content of standard output returned by invoking |cmdlist|. | ||
| 1449 | + Ignores the stderr. | ||
| 1450 | + Raises |GypError| if the command return with a non-zero return code.""" | ||
| 1451 | + job = subprocess.Popen(cmdlist, stdout=subprocess.PIPE, | ||
| 1452 | + stderr=subprocess.PIPE) | ||
| 1453 | + out = job.communicate()[0] | ||
| 1454 | + if job.returncode != 0: | ||
| 1455 | + raise GypError('Error %d running %s' % (job.returncode, cmdlist[0])) | ||
| 1456 | + return out.rstrip('\n') | ||
| 1457 | + | ||
| 1458 | + | ||
| 1447 | 1459 | def GetStdout(cmdlist): | |
| 1448 | 1460 | """Returns the content of standard output returned by invoking |cmdlist|. | |
| 1449 | 1461 | Raises |GypError| if the command return with a non-zero return code.""" | |
| Back | FazBrowse Home | New Git URL |
0 commit comments