summaryrefslogtreecommitdiffhomepage
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/CliApp.cxx (renamed from cli/AppMain.cxx)18
1 files changed, 12 insertions, 6 deletions
diff --git a/cli/AppMain.cxx b/cli/CliApp.cxx
index 6719c19..c2f9aad 100644
--- a/cli/AppMain.cxx
+++ b/cli/CliApp.cxx
@@ -1,6 +1,10 @@
+// ============================================================= //
+// btb
+// Copyright ZKA Technologies.
+// ============================================================= //
+
#include <Macros.hxx>
#include <JSONManifestBuilder.hxx>
-#include <TOMLManifestBuilder.hxx>
#include <cstdio>
#include <cstddef>
#include <string>
@@ -41,14 +45,12 @@ int main(int argc, char** argv)
std::thread job_build_thread([](std::string index_path) -> void {
IManifestBuilder* builder = nullptr;
- if (index_path.ends_with(".json"))
+ const auto cJsonExt = ".json";
+
+ if (index_path.ends_with(cJsonExt))
{
builder = new JSONManifestBuilder();
}
- else if (index_path.ends_with(".toml"))
- {
- builder = new TOMLManifestBuilder();
- }
else
{
cFailed = true;
@@ -61,6 +63,10 @@ int main(int argc, char** argv)
{
cFailed = true;
}
+ else if (!builder)
+ {
+ cFailed = true;
+ }
delete builder;