Compare commits

..

2 Commits

Author SHA1 Message Date
5772b696b9 Merge branch 'main' into laipz8200/fix-pyrefly-empty-target-paths 2026-05-18 15:59:05 +08:00
301d00f2df fix(dev): handle empty pyrefly target paths
Build the pyrefly command before execution and append target paths only when provided so Bash 3.2 with nounset does not fail on an empty array.
2026-05-18 15:56:39 +08:00

View File

@ -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