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

CLI: Catch errors thrown on sanity check of SB installs #22039

Merged
merged 1 commit into from
Apr 12, 2023

Conversation

valentinpalkovic
Copy link
Contributor

@valentinpalkovic valentinpalkovic commented Apr 12, 2023

Closes #21872

What I did

Add ignoreError flag to executeCommand method in JsPackageManager and use it in findInstallations method of NPMProxy to ignore errors returned by npm ls command

How to test

  1. Run upgrade command in a repro where npm ls --json --depth=99 returns some errors, like unmeet peer-dep errors
  2. The upgrade shouldn't exit with an error

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests)
  • Make sure to add/update documentation regarding your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Maintainers

  • If this PR should be tested against many or all sandboxes,
    make sure to add the ci:merged or ci:daily GH label to it.
  • Make sure this PR contains one of the labels below.

["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]

… use it in findInstallations method of NPMProxy to ignore errors returned by npm ls command
@valentinpalkovic valentinpalkovic self-assigned this Apr 12, 2023
@valentinpalkovic valentinpalkovic requested a review from yannbf April 12, 2023 07:24
@valentinpalkovic valentinpalkovic added the patch:yes Bugfix & documentation PR that need to be picked to main branch label Apr 12, 2023
@shilman shilman changed the title Add ignoreError flag to executeCommand method in JsPackageManager and CLI: Catch errors thrown on sanity check of SB installs Apr 12, 2023
@shilman shilman added the cli label Apr 12, 2023
@shilman shilman merged commit 95ae92b into next Apr 12, 2023
@shilman shilman deleted the valentin/fix-npm-ls-unexpected-error-thrown-1 branch April 12, 2023 08:49
@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label Apr 12, 2023
shilman added a commit that referenced this pull request Apr 12, 2023
…cted-error-thrown-1

CLI: Catch errors thrown on sanity check of SB installs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cli patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: npx sb@next upgrade --prerelease fails
3 participants