Skip to content

[vcpkg] allow --version to check the version#50

Merged
strega-nil merged 1 commit intomicrosoft:mainfrom
autoantwort:allow---version
Apr 15, 2021
Merged

[vcpkg] allow --version to check the version#50
strega-nil merged 1 commit intomicrosoft:mainfrom
autoantwort:allow---version

Conversation

@autoantwort
Copy link
Contributor

I don't know if my approach is the best one.
Fixes:
image
:D

@strega-nil strega-nil added the requires:discussion This PR requires discussion of the correct way forward label Apr 13, 2021
@strega-nil
Copy link
Contributor

requires:discussion on best way to actually do this

}
continue;
}
if (basic_arg == "--version" && args.command.empty())
Copy link
Collaborator

@ras0219-msft ras0219-msft Apr 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest moving this up to the top as:

if (arg_first != arg_last && arg_first + 1 == arg_last && *arg_first == "--version") {
    args.command = "version";
    return args;
}

With the current implementation,

vcpkg --version install blah

is interpreted as vcpkg version install blah which probably isn't correct. If nothing else, it should have the same semantics as

vcpkg install blah --version

(i.e. it should fail in the same way or succeed in the same way)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that sounds better

@strega-nil strega-nil merged commit 75dc1fe into microsoft:main Apr 15, 2021
@strega-nil
Copy link
Contributor

Thanks @autoantwort

strega-nil added a commit that referenced this pull request Apr 15, 2021
The following PRs are included:

* hopefully fix crash in constraints (#60)
* [vcpkg] allow --version to check the version (#50)
* Remove baseline warning (#27)
* [git] always pass autocrlf=false (#58)
* ignore QtCreator CMake project files (#54)
* ignore .DS_store files (#53)
* [vcpkg] x-add-version now also checks if the manifest file is properly formatted (#43)
* hopefully fix ci issue #16773 (#34)
* Add docs to set VCPKG_ROOT to run tests (#45)
* [vcpkg] x-add-version improve speed by calling get_builtin_baseline only once (#44)
* add clang-format version to format-cxxcode (#41)
* [vcpkg] Introduce experimental workaround X_VCPKG_NUGET_ID_PREFIX (#40)
* [supports] Add `native` identifier expression and x-check-support command (#29)
* [metrics] Split reporting of installs into name:triplet (#39)
* [vcpkg] Improve error when accessing missing feature (#38)
* [vcpkg] Allow shallow git registries (#37)
* Disable git autocrlf when archiving tree (#36)
* Use only named packages from extra registries (#35)
* [registries] add metrics (#30)
* Add vcpkg policy cmake helper port support (#17)
* [osx] add support for rosetta (#23)
* don't build tls12-download unless it's needed (#33)
* Add new telemetry points for versioning (#21)
* add cmake_minimum_required to vcpkg_tags (#25)
* [x-add-versions] Perform atomic replacement of versioning files (#28)
* [tools] support gsutil (#19)
* add CUDA 11.1 and 11.2 to KEEP_ENV_VARS defaults (#26)
* Add finite timeout on CURL metrics endpoint. (#22)
* fix UB in make_error_code(utf8_errc) (#18)
@autoantwort autoantwort deleted the allow---version branch September 4, 2021 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

requires:discussion This PR requires discussion of the correct way forward

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants