aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/lib.cpp
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2016-09-27 15:51:00 -0700
committerRobert Schumacher <roschuma@microsoft.com>2016-09-27 15:51:00 -0700
commit2ed13a583d5c8537680125d2ab5ec77b0f63503c (patch)
tree04ccba074c71e529ed62044bdc6eed2b5797c15e /toolsrc/src/lib.cpp
parent288bdf367aafce7d15d2e02836736cbecdb2e4e9 (diff)
downloadvcpkg-2ed13a583d5c8537680125d2ab5ec77b0f63503c.tar.gz
vcpkg-2ed13a583d5c8537680125d2ab5ec77b0f63503c.zip
[vcpkg] Provide more error information on installation failures
Diffstat (limited to 'toolsrc/src/lib.cpp')
-rw-r--r--toolsrc/src/lib.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/toolsrc/src/lib.cpp b/toolsrc/src/lib.cpp
index a717344a4..e9f12cd1b 100644
--- a/toolsrc/src/lib.cpp
+++ b/toolsrc/src/lib.cpp
@@ -176,7 +176,7 @@ static void install_and_write_listfile(const vcpkg_paths& paths, const BinaryPar
auto status = it->status(ec);
if (ec)
{
- System::println(System::color::error, "failed: %s", ec.message());
+ System::println(System::color::error, "failed: %s: %s", it->path().u8string(), ec.message());
continue;
}
if (fs::is_directory(status))
@@ -184,7 +184,7 @@ static void install_and_write_listfile(const vcpkg_paths& paths, const BinaryPar
fs::create_directory(target, ec);
if (ec)
{
- System::println(System::color::error, "failed: %s", ec.message());
+ System::println(System::color::error, "failed: %s: %s", target.u8string(), ec.message());
}
listfile << bpgh.target_triplet << "/" << suffix << "\n";
@@ -194,16 +194,16 @@ static void install_and_write_listfile(const vcpkg_paths& paths, const BinaryPar
fs::copy_file(*it, target, ec);
if (ec)
{
- System::println(System::color::error, "failed: %s", ec.message());
+ System::println(System::color::error, "failed: %s: %s", target.u8string(), ec.message());
}
listfile << bpgh.target_triplet << "/" << suffix << "\n";
}
else if (!fs::status_known(status))
{
- std::cout << "unknown status: " << *it << "\n";
+ System::println(System::color::error, "failed: %s: unknown status", it->path().u8string());
}
else
- std::cout << "warning: file does not exist: " << *it << "\n";
+ System::println(System::color::error, "failed: %s: cannot handle file type", it->path().u8string());
}
listfile.close();
@@ -374,16 +374,16 @@ void vcpkg::deinstall_package(const vcpkg_paths& paths, const package_spec& spec
fs::remove(target, ec);
if (ec)
{
- System::println(System::color::error, "failed: %s", ec.message());
+ System::println(System::color::error, "failed: %s: %s", target.u8string(), ec.message());
}
}
else if (!fs::status_known(status))
{
- System::println(System::color::warning, "Warning: unknown status: %s", target.string());
+ System::println(System::color::warning, "Warning: unknown status: %s", target.u8string());
}
else
{
- System::println(System::color::warning, "Warning: ???: %s", target.string());
+ System::println(System::color::warning, "Warning: %s: cannot handle file type", target.u8string());
}
}