diff options
| author | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-10-09 12:46:15 +0200 |
|---|---|---|
| committer | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-10-09 12:46:15 +0200 |
| commit | 40a11d15d51c0fdfb93003d97aae6fc0c4538890 (patch) | |
| tree | deb011bea80e7112eca854416aaf99cedc58ba79 /cli | |
| parent | 904a70bf75ba9f5320cac611a2fab3f1fbd02425 (diff) | |
IMP: Improved ReadMe and support pwsh for run_after_build command.
Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
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; |
