Version check is now performed before running any command
(except vcpkg version/hash/contact)
MODIFY
src/commands_update.cpp
src/commands_update.cpp
@@ -68,8 +68,6 @@ namespace vcpkg::Commands::Update
install_line);
}
- Version::warn_if_vcpkg_version_mismatch(paths);
-
Checks::exit_success(VCPKG_LINE_INFO);
}
}

MODIFY
src/vcpkg.cpp
src/vcpkg.cpp
@@ -69,6 +69,7 @@ static void inner(const VcpkgCmdArguments& args)
const VcpkgPaths paths = expected_paths.value_or_exit(VCPKG_LINE_INFO);
const int exit_code = _wchdir(paths.root.c_str());
Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Changing the working dir failed");
+ Commands::Version::warn_if_vcpkg_version_mismatch(paths);
if (const auto command_function = Commands::find(args.command, Commands::get_available_commands_type_b()))
{

Version check is now performed before running any command

(except vcpkg version/hash/contact)