Version check is now performed before running any command

(except vcpkg version/hash/contact)
This commit is contained in:
Alexander Karatarakis 2017-09-14 04:13:03 -07:00
parent d55036a797
commit be27ae05f0
2 changed files with 1 additions and 2 deletions

View File

@ -68,8 +68,6 @@ namespace vcpkg::Commands::Update
install_line);
}
Version::warn_if_vcpkg_version_mismatch(paths);
Checks::exit_success(VCPKG_LINE_INFO);
}
}

View File

@ -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()))
{