summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2025-01-21 12:48:18 +0100
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2025-01-29 16:05:35 +0100
commitc03b4097c7fadd4366db816732bd69f7ee2433fe (patch)
tree1323550850eae8f7f45a2c40204b7f4309d39273 /bin
parent0de8e8b85dc56828000272d81fc7af0865bee477 (diff)
downloadjustbuild-c03b4097c7fadd4366db816732bd69f7ee2433fe.tar.gz
just-lock: Ensure all commands use the run_cmd method
Diffstat (limited to 'bin')
-rwxr-xr-xbin/just-lock.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/bin/just-lock.py b/bin/just-lock.py
index b4cdd078..a3650d0a 100755
--- a/bin/just-lock.py
+++ b/bin/just-lock.py
@@ -277,11 +277,10 @@ def ensure_git_init(*,
def git_commit_present(commit: str, *, upstream: Optional[str]) -> bool:
"""Check if commit is present in specified Git repository."""
- result = subprocess.run(g_LAUNCHER + [g_GIT, "show", "--oneline", commit],
- stdout=subprocess.DEVNULL,
- stderr=subprocess.DEVNULL,
- cwd=git_root(upstream=upstream))
- return result.returncode == 0
+ return run_cmd(g_LAUNCHER + [g_GIT, "show", "--oneline", commit],
+ stdout=subprocess.DEVNULL,
+ cwd=git_root(upstream=upstream),
+ fail_context=None)[1] == 0
def git_url_is_path(url: str) -> Optional[str]: