Merge pull request #12839 from facaiy/BLD/check_if_patch_is_installed
BLD: precheck patch command before invoked
This commit is contained in:
commit
de97f2df06
@ -99,6 +99,9 @@ def _execute_and_check_ret_code(repo_ctx, cmd_and_args):
|
|||||||
# Apply a patch_file to the repository root directory
|
# Apply a patch_file to the repository root directory
|
||||||
# Runs 'patch -p1'
|
# Runs 'patch -p1'
|
||||||
def _apply_patch(repo_ctx, patch_file):
|
def _apply_patch(repo_ctx, patch_file):
|
||||||
|
if not repo_ctx.which("patch"):
|
||||||
|
fail("patch command is not found, please install it")
|
||||||
|
|
||||||
cmd = [
|
cmd = [
|
||||||
"patch", "-p1", "-d", repo_ctx.path("."), "-i", repo_ctx.path(patch_file)
|
"patch", "-p1", "-d", repo_ctx.path("."), "-i", repo_ctx.path(patch_file)
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user