Skip to content

fix(pana-score): avoid Dart SDK install collision - #65

Merged
PiotrRogulski merged 3 commits into
masterfrom
claude/pana-sdk-install-conflict-lqhbab
Aug 7, 2026
Merged

PiotrRogulski merged 3 commits into
masterfrom
claude/pana-sdk-install-conflict-lqhbab

Conversation

@PiotrRogulski

Copy link
Copy Markdown
Member

Summary

  • dart-lang/setup-dart downloads to a fixed filename under $RUNNER_TEMP without cleaning it up, so calling the pana-score action more than once in the same job (e.g. scoring several packages, which the README already documents as a supported use case) makes the second install collide with the first's leftover zip and fail with Destination file path ... already exists.
  • Added a check that queries dart-archive's latest/VERSION and compares it against dart --version already on PATH; dart-lang/setup-dart is now only run when the installed SDK isn't already the latest stable release.
  • Before a (re)install, any stale dartsdk-*.zip in $RUNNER_TEMP is removed so the download can't collide with itself either.

Test plan

  • Trigger a workflow that calls pana-score more than once in the same job and confirm the second call skips the Dart install instead of failing.
  • Confirm a single call still installs Dart and scores the package correctly.

Generated by Claude Code

claude added 3 commits August 7, 2026 05:18
dart-lang/setup-dart downloads to a fixed filename under $RUNNER_TEMP
without cleaning it up, so invoking this action more than once in the
same job (e.g. scoring several packages) makes the second Dart install
collide with the first's leftover zip and fail. Skip re-running setup
once Dart is ready in the job, and defensively clear any stale download
beforehand.
Query dart-archive's latest/VERSION and compare against `dart --version`
on PATH; only (re)run dart-lang/setup-dart when the installed SDK isn't
already the latest stable release, clearing any stale zip first so a
reinstall can't collide with its own leftovers.
@PiotrRogulski
PiotrRogulski merged commit d5b02aa into master Aug 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants