Skip to content

🐛 fix(action): skip uv install when already present - #23

Merged
gaborbernat merged 1 commit into
tox-dev:mainfrom
gaborbernat:7
Feb 27, 2026
Merged

🐛 fix(action): skip uv install when already present#23
gaborbernat merged 1 commit into
tox-dev:mainfrom
gaborbernat:7

Conversation

@gaborbernat

Copy link
Copy Markdown
Member

Users who already run setup-uv earlier in their workflow get a redundant second installation when this action unconditionally calls setup-uv again. This wastes CI time downloading and setting up uv twice, as reported in #7.

The action now checks whether uv is already on PATH before running the setup-uv step. 🔧 If uv is detected, the install step is skipped entirely. This keeps the action fully self-contained for standalone use — when no prior setup-uv exists, it installs uv as before — while avoiding duplicate work in combined workflows.

Note: the comments on #7 also mention that the pre-commit-uv Python package itself declares uv as a dependency, causing yet another download inside the --with environment. That's a separate concern in the pre-commit-uv package, not this action.

Closes #7

Users who run setup-uv earlier in their workflow get a redundant second
installation when this action unconditionally calls setup-uv again.

Detect uv on PATH before the install step and skip setup-uv if it's
already available. This keeps the action self-contained for standalone
use while avoiding duplicate installs in combined workflows.

Closes tox-dev#7
@gaborbernat gaborbernat added the bug Something isn't working label Feb 27, 2026
@gaborbernat
gaborbernat merged commit 90369ff into tox-dev:main Feb 27, 2026
2 checks passed
@gaborbernat
gaborbernat deleted the 7 branch July 10, 2026 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

uv is re-installed

1 participant