diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2016-12-16 15:42:15 -0800 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2016-12-16 15:42:15 -0800 |
| commit | bd50778cb53d7071d65159f0aa67e685a6628e19 (patch) | |
| tree | 92e0f82ef4f9cadc9ebb11d477441a1c668f9774 /toolsrc/src/commands_installation.cpp | |
| parent | 38859d5c91c6411fb2b0757a68fd3ca297927650 (diff) | |
| download | vcpkg-bd50778cb53d7071d65159f0aa67e685a6628e19.tar.gz vcpkg-bd50778cb53d7071d65159f0aa67e685a6628e19.zip | |
[install_command] now overwrites files if they are already present
The listfile checks ensures that no other package claims ownership
of the particular file
Diffstat (limited to 'toolsrc/src/commands_installation.cpp')
| -rw-r--r-- | toolsrc/src/commands_installation.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/toolsrc/src/commands_installation.cpp b/toolsrc/src/commands_installation.cpp index 605343dfc..8d940bc9d 100644 --- a/toolsrc/src/commands_installation.cpp +++ b/toolsrc/src/commands_installation.cpp @@ -114,7 +114,11 @@ namespace vcpkg if (fs::is_regular_file(status)) { - fs::copy_file(*it, target, ec); + if (fs::exists(target)) + { + System::println(System::color::warning, "File %s was already present and will be overwritten", target.u8string(), ec.message()); + } + fs::copy_file(*it, target, fs::copy_options::overwrite_existing, ec); if (ec) { System::println(System::color::error, "failed: %s: %s", target.u8string(), ec.message()); |
