mirror of
https://github.com/facebook/proxygen.git
synced 2025-08-07 07:02:53 +03:00
fbcode_builder: fix run_cmake.py to propagate the command return code
Summary: Update the generated `run_cmake.py` script to use `os.execve()` rather than `subprocess.call()`, so that it now propagates CMake's return code back to its caller. Reviewed By: chadaustin Differential Revision: D17089206 fbshipit-source-id: e01f05f492ccb842d4967e59fd0bc9a3e59b8a42
This commit is contained in:
committed by
Facebook Github Bot
parent
b551ef8889
commit
904525ba3f
@@ -200,7 +200,6 @@ from __future__ import absolute_import, division, print_function, unicode_litera
|
|||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
import subprocess
|
|
||||||
|
|
||||||
CMAKE = {cmake!r}
|
CMAKE = {cmake!r}
|
||||||
SRC_DIR = {src_dir!r}
|
SRC_DIR = {src_dir!r}
|
||||||
@@ -266,7 +265,8 @@ def main():
|
|||||||
|
|
||||||
cmd_str = " ".join(full_cmd)
|
cmd_str = " ".join(full_cmd)
|
||||||
print("Running: %r" % (cmd_str,))
|
print("Running: %r" % (cmd_str,))
|
||||||
subprocess.call(full_cmd, env=env, cwd=BUILD_DIR)
|
os.chdir(BUILD_DIR)
|
||||||
|
os.execve(CMAKE, full_cmd, env)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
Reference in New Issue
Block a user