Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rush] Fix issue where "rush update-autoinstaller" doesn't perform a full upgrade #4300

Merged
merged 8 commits into from
Aug 30, 2023

Conversation

octogonz
Copy link
Collaborator

@octogonz octogonz commented Aug 29, 2023

Summary

While trying to resolve microsoft/rushstack-websites#193, I encountered a problem where rush update-autoinstaller was not performing a full upgrade, because it does not implement rush install's workaround for pnpm/pnpm#1890.

Details

rush update-autoinstaller tries to force a clean reinstall by deleting pnpm-lock.yaml, but PNPM has an unusual behavior where it tries to recover the deleted file using a backup copy from the node_modules folder. (Other package managers don't do that, but the issue notes explains an obscure use case that justifies it.) Rush works around this problem by deleting the backup file as well, but rush update-autoinstaller is missing that logic.

I also fixed a minor regression from PR #3391 where _logIfConsoleOutputIsNotRestricted() was printing undefined instead of a blank line.

How it was tested

How I reproed the issue:

  1. Clone microsoft/rushstack-websites@516e830
  2. Invoke rush prettier to install the rush-prettier autoinstaller
  3. Then invoke rush update-autoinstaller --name rush-prettier. The lockfile version number is incremented, but no dependencies are upgraded. (Whereas if we skipped step 2, then a full upgrade would be performed.)

Redoing step 3 with my PR build, the upgrade is performed successfully.

Impacted documentation

None.

@octogonz octogonz merged commit 702beb1 into main Aug 30, 2023
@octogonz octogonz deleted the octogonz/update-autoinstaller-fix branch August 30, 2023 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants