--- a/src/CLIParser.h Tue Oct 22 16:04:23 2019 +0200
+++ b/src/CLIParser.h Tue Oct 22 16:04:56 2019 +0200
@@ -70,7 +70,11 @@
} else if (option == OPTION_FILE) {
c.file = readNext(arguments, i);
} else if (option == OPTION_KEEP_FILE) {
- c.keepFile = true;
+ string_t value = readNext(arguments, i);
+ if (value == L"auto") c.keepFile = KeepFile::Automatic;
+ else if (value == L"true") c.keepFile = KeepFile::Always;
+ else if (value == L"false") c.keepFile = KeepFile::Never;
+ else throw relpipe::cli::RelpipeCLIException(L"Unsupported keep-file value: " + value + L" Expecting: true, false, auto", relpipe::cli::CLI::EXIT_CODE_BAD_CLI_ARGUMENTS);
} else throw relpipe::cli::RelpipeCLIException(L"Unsupported CLI option: " + option, relpipe::cli::CLI::EXIT_CODE_BAD_CLI_ARGUMENTS);
}
addQuery(c, currentQuery); // last relation