From 0700140015db2c000c0a05a25eb3aeb4e6f534b6 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Sat, 16 May 2020 18:00:31 -0400 Subject: [PATCH] removed empty command, must specify build now --- bootstrap.bat | 2 +- src/commands.cpp | 2 +- src/main.cpp | 20 +++----------------- 3 files changed, 5 insertions(+), 19 deletions(-) diff --git a/bootstrap.bat b/bootstrap.bat index c33dcea..7e4d564 100644 --- a/bootstrap.bat +++ b/bootstrap.bat @@ -37,4 +37,4 @@ if %errorlevel% neq 0 ( ) copy "build\Release\x64\mob.exe" .\mob.exe > NUL -echo run `mob -d path` to start building +echo run `mob -d prefix/path build` to start building diff --git a/src/commands.cpp b/src/commands.cpp index 7474012..4d5c6ca 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -194,7 +194,7 @@ int help_command::do_run() " build builds tasks\n" " release creates a release or a devbuild" "\n\n" - "Invoking `mob` without a command builds everything. Do " + "Invoking `mob -d some/prefix build` builds everything. Do \n" "`mob build ...` to build specific tasks. See\n" "`mob command --help` for more information about a command."); diff --git a/src/main.cpp b/src/main.cpp index a1a7765..d1c0f2d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -57,23 +57,9 @@ std::shared_ptr handle_command_line(const std::vector& arg return std::move(c); } - // another way parsing can fail is if no commands are given, like just - // running `mob` as-is; clipp doesn't really have a ways of setting - // a default command to use, to the arguments can be reparsed with - // only the common options - cli = command::common_options_group(); - pr = clipp::parse(args, cli); - - if (!pr) - { - // bad command line - help->force_exit_code(1); - return help; - } - - // if this parsing works, it means the user invoked `mob` without a - // command; default to `build` - build->force_pick(); + // bad command line + help->force_exit_code(1); + return help; }