From 59e96fbb2aae884ff495ea2cd3f45c16db5827a7 Mon Sep 17 00:00:00 2001 From: -LAN- Date: Mon, 18 May 2026 16:04:03 +0800 Subject: [PATCH] fix(dev): handle empty pyrefly target paths (#36325) --- dev/pyrefly-check-local | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dev/pyrefly-check-local b/dev/pyrefly-check-local index e29dfe49e0..be78230662 100755 --- a/dev/pyrefly-check-local +++ b/dev/pyrefly-check-local @@ -34,8 +34,16 @@ if [[ -f "$EXCLUDES_FILE" ]]; then fi tmp_output="$(mktemp)" +pyrefly_command=( + uv run --directory api --dev pyrefly check + "${pyrefly_args[@]}" +) +if (( ${#target_paths[@]} > 0 )); then + pyrefly_command+=("${target_paths[@]}") +fi + set +e -uv run --directory api --dev pyrefly check "${pyrefly_args[@]}" "${target_paths[@]}" >"$tmp_output" 2>&1 +"${pyrefly_command[@]}" >"$tmp_output" 2>&1 pyrefly_status=$? set -e