diff -r 5e5815fdcd2d -r ab27422a34b0 src/CLIParser.h --- a/src/CLIParser.h Thu Sep 24 16:03:05 2020 +0200 +++ b/src/CLIParser.h Thu Sep 24 20:37:52 2020 +0200 @@ -99,8 +99,10 @@ } else if (option == OPTION_RECORDS) { while (i < arguments.size()) readNextRecord(arguments, i, currentRelation); } else if (option == OPTION_RECORDS_STDIN) { - for (RelationConfiguration r : c.relationConfigurations) if (r.valueStream) throw relpipe::cli::RelpipeCLIException(L"Only one relation can read data from STDIN.", relpipe::cli::CLI::EXIT_CODE_BAD_CLI_ARGUMENTS); - currentRelation.valueStream = &std::cin; + if (parseBoolean(readNext(arguments, i))) { + for (RelationConfiguration r : c.relationConfigurations) if (r.valueStream) throw relpipe::cli::RelpipeCLIException(L"Only one relation can read data from STDIN.", relpipe::cli::CLI::EXIT_CODE_BAD_CLI_ARGUMENTS); + currentRelation.valueStream = &std::cin; + } } else throw relpipe::cli::RelpipeCLIException(L"Unsupported CLI option: " + option, relpipe::cli::CLI::EXIT_CODE_BAD_CLI_ARGUMENTS); } addRelation(c, currentRelation); // last relation @@ -117,7 +119,7 @@ const relpipe::writer::string_t CLIParser::OPTION_ATTRIBUTE = L"--attribute"; const relpipe::writer::string_t CLIParser::OPTION_RECORD = L"--record"; const relpipe::writer::string_t CLIParser::OPTION_RECORDS = L"--records"; -const relpipe::writer::string_t CLIParser::OPTION_RECORDS_STDIN = L"--records-from-stdin"; +const relpipe::writer::string_t CLIParser::OPTION_RECORDS_STDIN = L"--records-on-stdin"; } }