Skip to content

fix(installer): hard-fail and roll back when reshim cannot create shims - #37

Merged
coreybutler merged 1 commit into
mainfrom
fix/install-reshim-hard-fail-rollback
Nov 23, 2026
Merged

coreybutler merged 1 commit into
mainfrom
fix/install-reshim-hard-fail-rollback

Conversation

@coreybutler

Copy link
Copy Markdown
Contributor

Summary

  • Hard-fail install and roll back when reshim cannot create shims
  • Reuse Help Enabling Symlinks toast + stderr guidance

What

finalizeInstallShims runs reshim before discarding backups; on failure toasts, guides, rolls back new version dirs, and returns error (nvm#1570). Activation path toasts on reshim failure too.

Why

Stop reporting successful installs when npm/npx shims were never created.

Testing

  • go test ./installer/ -run TestFinalizeInstallShimsRollsBackOnReshimFailure
  • End-to-end install with cross-drive root after pin

Risk

Medium — installs that previously soft-warned now hard-fail (intended).
Depends on common HelpEnablingSymlinks and shim fail-closed exit.

Run reshim before discarding install backups; on failure show the
Help Enabling Symlinks toast, print guidance, roll back new version
dirs, and return an error instead of reporting success (nvm#1570).

Signed-off-by: Corey Butler <770982+coreybutler@users.noreply.github.com>
@coreybutler
coreybutler merged commit 9945a83 into main Nov 23, 2026
5 of 6 checks passed
@coreybutler
coreybutler deleted the fix/install-reshim-hard-fail-rollback branch November 23, 2026 18:56
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.

1 participant