]> git.tdb.fi Git - builder.git/commitdiff
Make PackageManager::run_pkgconfig fail on Windows
authorMikko Rasa <tdb@tdb.fi>
Wed, 4 Jan 2023 10:38:30 +0000 (12:38 +0200)
committerMikko Rasa <tdb@tdb.fi>
Wed, 4 Jan 2023 10:38:30 +0000 (12:38 +0200)
... instead of returning an empty string which would be interpreted as a
successful result and used to create bogus binary packages.

source/lib/packagemanager.cpp

index 5e124220d7be2a65693e6bb777fac71cfa3d739a..7bf546837472d2ec152c0afad9bb261fa77644ee 100644 (file)
@@ -1,5 +1,6 @@
 #include <cstdlib>
 #include <msp/core/algorithm.h>
+#include <msp/core/except.h>
 #include <msp/fs/dir.h>
 #include <msp/fs/stat.h>
 #include <msp/fs/utils.h>
@@ -160,7 +161,7 @@ string PackageManager::run_pkgconfig(const string &pkg, const string &what)
 #else
        (void)pkg;
        (void)what;
-       return string();
+       throw unsupported("run_pkgconfig");
 #endif
 }