Skip to content

Fix multiple-installs false positive for asdf shims#408

Draft
gtsiolis wants to merge 1 commit into
mainfrom
devx-1015-multiple-installs-warning-false-positives-on-asdf-shim-npm
Draft

Fix multiple-installs false positive for asdf shims#408
gtsiolis wants to merge 1 commit into
mainfrom
devx-1015-multiple-installs-warning-false-positives-on-asdf-shim-npm

Conversation

@gtsiolis

Copy link
Copy Markdown
Member

Motivation

lstk warns about "multiple installs" whenever an asdf-managed npm install is also reachable through its asdf shim on PATH, even though both paths point at the same install — a false positive that fires on every run for asdf users.

Changes

  • Resolve asdf shim scripts back to their real install path (internal/update/installs_unix.go) by parsing the # asdf-plugin: <name> <version> comment asdf writes into each shim, before dedup runs in FindInstalls (internal/update/installs.go)
  • Add a no-op executableAlias on Windows (installs_windows.go), where asdf shims don't apply
  • Add unit test TestFindInstallsDeduplicatesAsdfShimAlias and integration test TestUpdateCheckDoesNotWarnOnAsdfShimAlias

Review

Human review advised — found and fixed today with no prior Slack/Linear discussion before this PR, even though it's small, self-contained, and fully tested (per the review-pr skill's scope checklist: undiscussed work defaults to review regardless of size).

Tests

New unit + integration tests reproduce the false positive and confirm it's resolved. Also verified directly against a real asdf + npm install on this machine: today's code reports 2 installs for this PATH combination, this branch reports 1, correctly classified as npm.

Closes DEVX-1015

Co-Authored-By: Claude noreply@anthropic.com

Co-Authored-By: Claude <noreply@anthropic.com>
@gtsiolis gtsiolis added semver: patch docs: skip Pull request does not require documentation changes labels Jul 24, 2026
@gtsiolis gtsiolis self-assigned this Jul 24, 2026
@gtsiolis

Copy link
Copy Markdown
Member Author

Cc @skyrpex because #398.

@skyrpex

skyrpex commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

@gtsiolis thanks, didn't know about this. I thought we were fine deduping symlinks 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs: skip Pull request does not require documentation changes semver: patch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants