fbcode_builder: getdeps: add run_cmd() function
Summary: This runs a command, raising an exception if it exits with a non-zero error status. It prints out the arguments in a mostly copy-and-pasteable form, with PATH-like env vars pretty printed to make it easier to see what is being invoked; here's an example of how cmake is being invoked later in this stack: ``` --- + CMAKE_PREFIX_PATH=\ + /data/users/wez/scratch/dataZusersZwezZfbsource/fbcode_builder_getdeps/installed/ninja-5d7ec7:\ + /data/users/wez/scratch/dataZusersZwezZfbsource/fbcode_builder_getdeps/installed/cmake-91dc9a:\ + PKG_CONFIG_PATH=\ + /data/users/wez/scratch/dataZusersZwezZfbsource/fbcode_builder_getdeps/installed/ninja-5d7ec7/lib/pkgconfig:\ + /data/users/wez/scratch/dataZusersZwezZfbsource/fbcode_builder_getdeps/installed/cmake-91dc9a/lib/pkgconfig:\ + cd /data/users/wez/scratch/dataZusersZwezZfbsource/fbcode_builder_getdeps/build/zstd-470344 && \ + cmake configure /data/users/wez/scratch/dataZusersZwezZfbsource/fbcode_builder_getdeps/repos/github.com-facebook-zstd.git/build/cmake -DCMAKE_INST ALL_PREFIX=/data/users/wez/scratch/dataZusersZwezZfbsource/fbcode_builder_getdeps/installed/zstd-470344 -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=R elWithDebInfo -G Ninja ``` Reviewed By: simpkins Differential Revision: D14690999 fbshipit-source-id: cdb0c681c7dfdfdc6e8c96bf4830bfbcf666411b
Showing
Please register or sign in to comment