MCPcopy Index your code
hub / github.com/ezyang/ghstack / run

Method run

src/ghstack/shell.py:180–198  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

178 stdin_writer.close()
179
180 async def run() -> Tuple[int, bytes, bytes]:
181 proc = await asyncio.create_subprocess_exec(
182 *args,
183 stdin=stdin,
184 stdout=asyncio.subprocess.PIPE,
185 stderr=asyncio.subprocess.PIPE,
186 cwd=self.cwd,
187 env=env,
188 )
189 assert proc.stdout is not None
190 assert proc.stderr is not None
191 _, out, err, _ = await asyncio.gather(
192 feed_input(proc.stdin),
193 process_stream(proc.stdout, stdout, sys.stdout),
194 process_stream(proc.stderr, stderr, sys.stderr),
195 proc.wait(),
196 )
197 assert proc.returncode is not None
198 return (proc.returncode, out, err)
199
200 loop = asyncio.get_event_loop()
201 returncode, out, err = loop.run_until_complete(run())

Callers 7

run_commandFunction · 0.45
check_mypy_installedFunction · 0.45
_run_commandFunction · 0.45
get_gh_cli_credentialsFunction · 0.45
mainFunction · 0.45
base_dirFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected