Remove fs::exists() call
MODIFY
src/commands_integrate.cpp
src/commands_integrate.cpp
@@ -166,9 +166,7 @@ namespace vcpkg::Commands::Integrate
fs::create_directory(tmp_dir);
bool should_install_system = true;
- if (fs::exists(system_wide_targets_file))
- {
- auto system_wide_file_contents = Files::read_contents(system_wide_targets_file);
+ const expected<std::string> system_wide_file_contents = Files::read_contents(system_wide_targets_file);
if (auto contents_data = system_wide_file_contents.get())
{
std::regex re(R"###(<!-- version (\d+) -->)###");
@@ -181,7 +179,6 @@ namespace vcpkg::Commands::Integrate
should_install_system = false;
}
}
- }
if (should_install_system)
{

Remove fs::exists() call