MCPcopy Create free account
hub / github.com/nodejs/node / GetStdout

Function GetStdout

tools/gyp/pylib/gyp/xcode_emulation.py:1566–1574  ·  view source on GitHub ↗

Returns the content of standard output returned by invoking |cmdlist|. Raises |GypError| if the command return with a non-zero return code.

(cmdlist)

Source from the content-addressed store, hash-verified

1564
1565
1566def GetStdout(cmdlist):
1567 """Returns the content of standard output returned by invoking |cmdlist|.
1568 Raises |GypError| if the command return with a non-zero return code."""
1569 job = subprocess.Popen(cmdlist, stdout=subprocess.PIPE)
1570 out = job.communicate()[0].decode("utf-8")
1571 if job.returncode != 0:
1572 sys.stderr.write(out + "\n")
1573 raise GypError("Error %d running %s" % (job.returncode, cmdlist[0]))
1574 return out.rstrip("\n")
1575
1576
1577def MergeGlobalXcodeSettingsToSpec(global_dict, spec):

Callers 3

_BuildMachineOSBuildMethod · 0.85
_DefaultSdkRootMethod · 0.85
CLTVersionFunction · 0.85

Calls 3

GypErrorClass · 0.90
decodeMethod · 0.65
writeMethod · 0.45

Tested by

no test coverage detected