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

Fail with proper message if you use upgrade in manifest mode. #1066

Merged
merged 3 commits into from
May 17, 2023

Conversation

autoantwort
Copy link
Contributor

@autoantwort autoantwort commented May 15, 2023

Currently you get:

➜  vcpkg git:(master) vcpkg upgrade --no-dry-run test
error: The upgrade command does not currently support manifest mode. Instead, modify your vcpkg.json and run install.
/Users/leanderSchulten/git_projekte/vcpkg-tool/src/vcpkg/commands.upgrade.cpp(49): unreachable code was reached

Which is imo not the optimal message to be shown to the user.

In the past msg_exit_maybe_upgrade was used, but since I don't expect that upgrade will ever work in manifest mode I decided to use msg_exit_with_error.

Now:

➜  vcpkg git:(master) vcpkg upgrade --no-dry-run test
error: The upgrade command does not currently support manifest mode. Instead, modify your vcpkg.json and run install.

@Neumann-A
Copy link
Contributor

Shouldn't upgrade in manifest mode not actually redirect to normal install in manifest mode? I mean manifest mode autoupdates the installed tree any way.

@BillyONeal
Copy link
Member

Shouldn't upgrade in manifest mode not actually redirect to normal install in manifest mode? I mean manifest mode autoupdates the installed tree any way.

We could redirect to x-update-manifest when the experimental tag comes off of that, but I don't think upgrade should do that.

@BillyONeal BillyONeal merged commit 835798f into microsoft:main May 17, 2023
@BillyONeal
Copy link
Member

Thanks!

@autoantwort autoantwort deleted the feature/upgrade-manifest-mode branch May 17, 2023 20:41
BillyONeal added a commit to BillyONeal/vcpkg-tool that referenced this pull request Sep 8, 2023
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.

3 participants