mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 18:29:01 +08:00
[CI] Fix too early deletion of files
This commit is contained in:
parent
35e19d5926
commit
e02c9e5354
@ -399,16 +399,6 @@ namespace vcpkg::Build
|
||||
}
|
||||
}
|
||||
|
||||
if (config.build_package_options.clean_packages == CleanPackages::YES)
|
||||
{
|
||||
auto& fs = paths.get_filesystem();
|
||||
const PackageSpec spec = PackageSpec::from_name_and_triplet(config.scf.core_paragraph->name, config.triplet)
|
||||
.value_or_exit(VCPKG_LINE_INFO);
|
||||
const fs::path package_dir = paths.package_dir(spec);
|
||||
std::error_code ec;
|
||||
fs.remove_all(package_dir, ec);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -308,6 +308,15 @@ namespace vcpkg::Install
|
||||
auto bcf = std::make_unique<BinaryControlFile>(
|
||||
Paragraphs::try_load_cached_control_package(paths, action.spec).value_or_exit(VCPKG_LINE_INFO));
|
||||
auto code = aux_install(display_name_with_features, *bcf);
|
||||
|
||||
if (action.build_options.clean_packages == Build::CleanPackages::YES)
|
||||
{
|
||||
auto& fs = paths.get_filesystem();
|
||||
const fs::path package_dir = paths.package_dir(action.spec);
|
||||
std::error_code ec;
|
||||
fs.remove_all(package_dir, ec);
|
||||
}
|
||||
|
||||
return {code, std::move(bcf)};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user