mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
fix(scripts): print the make check verdict on early informational exits
This commit is contained in:
parent
cfbd43172a
commit
3fbe40c9b1
2 changed files with 4 additions and 0 deletions
|
|
@ -55,11 +55,13 @@ else
|
|||
merge_base=$(git merge-base origin/litellm_internal_staging HEAD 2>/dev/null) || {
|
||||
echo "check: cannot resolve the merge base with origin/litellm_internal_staging." >&2
|
||||
echo " Fix: git fetch origin litellm_internal_staging" >&2
|
||||
echo "check: FAIL"
|
||||
exit 1
|
||||
}
|
||||
scope=$(printf '%s\n' "$(git diff --name-only --diff-filter=ACMRD "$merge_base")" "$untracked" | sed '/^$/d' | sort -u)
|
||||
if [ -z "$scope" ]; then
|
||||
echo "check: nothing to check (no staged files, no working-tree changes, no branch changes vs origin/litellm_internal_staging)"
|
||||
echo "check: PASS"
|
||||
exit 0
|
||||
fi
|
||||
echo "check: nothing staged; scoping to the working tree's diff against the merge base with origin/litellm_internal_staging:"
|
||||
|
|
|
|||
|
|
@ -224,6 +224,7 @@ def test_nothing_staged_and_no_changes_is_an_explicit_no_op(tmp_path: Path) -> N
|
|||
proc = _run(repo, bin_dir, {})
|
||||
assert proc.returncode == 0, proc.stdout + proc.stderr
|
||||
assert "nothing to check" in proc.stdout
|
||||
assert "check: PASS" in proc.stdout
|
||||
assert "linting Python" not in proc.stdout
|
||||
|
||||
|
||||
|
|
@ -234,6 +235,7 @@ def test_nothing_staged_without_a_base_ref_fails_with_a_fetch_hint(tmp_path: Pat
|
|||
assert proc.returncode == 1
|
||||
assert "cannot resolve the merge base" in proc.stdout
|
||||
assert "git fetch origin litellm_internal_staging" in proc.stdout
|
||||
assert "check: FAIL" in proc.stdout
|
||||
|
||||
|
||||
def test_partial_staging_warns_which_checks_were_skipped(tmp_path: Path) -> None:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue