diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2017-02-03 18:10:29 -0800 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2017-02-10 14:00:11 -0800 |
| commit | a13b2f0c92d1cd5322ed0cb839a4bba5b1ab6aa7 (patch) | |
| tree | 35cda0b755f5d3c7304b44663c6e1732a0df7664 /toolsrc/src/PostBuildLint.cpp | |
| parent | 95650bdd424b9499f4676dae8f110b15b3fd024f (diff) | |
| download | vcpkg-a13b2f0c92d1cd5322ed0cb839a4bba5b1ab6aa7.tar.gz vcpkg-a13b2f0c92d1cd5322ed0cb839a4bba5b1ab6aa7.zip | |
build_package() modified to return the result of the build
Diffstat (limited to 'toolsrc/src/PostBuildLint.cpp')
| -rw-r--r-- | toolsrc/src/PostBuildLint.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/toolsrc/src/PostBuildLint.cpp b/toolsrc/src/PostBuildLint.cpp index 23f1347cf..a5fd7aa52 100644 --- a/toolsrc/src/PostBuildLint.cpp +++ b/toolsrc/src/PostBuildLint.cpp @@ -619,6 +619,7 @@ namespace vcpkg::PostBuildLint left += static_cast<size_t>(right); } + static size_t perform_all_checks_and_return_error_count(const package_spec& spec, const vcpkg_paths& paths) { const fs::path dumpbin_exe = Environment::get_dumpbin_exe(paths); @@ -710,19 +711,18 @@ namespace vcpkg::PostBuildLint return error_count; } - void perform_all_checks(const package_spec& spec, const vcpkg_paths& paths) + size_t perform_all_checks(const package_spec& spec, const vcpkg_paths& paths) { System::println("-- Performing post-build validation"); - const size_t error_count = perform_all_checks_and_return_error_count(spec, paths); + System::println("-- Performing post-build validation done"); if (error_count != 0) { const fs::path portfile = paths.ports / spec.name() / "portfile.cmake"; System::println(System::color::error, "Found %u error(s). Please correct the portfile:\n %s", error_count, portfile.string()); - exit(EXIT_FAILURE); } - System::println("-- Performing post-build validation done"); + return error_count; } } |
