--- a/StdInCommand.h Sat Jul 28 22:29:40 2018 +0200
+++ b/StdInCommand.h Sun Jul 29 14:42:50 2018 +0200
@@ -48,6 +48,8 @@
if (ch == 0 || input.eof() || input.fail()) break;
else value << ch;
}
+
+ if (required && value.str().empty()) throw RelpipeCLIException(L"Missing value on STDIN.", CLI::EXIT_CODE_BAD_SYNTAX);
return convertor.from_bytes(value.str());
}
@@ -80,6 +82,7 @@
string_t value = readNext(input, arguments, i, false);
if (value.empty() && (input.eof() || input.fail())) break;
else writer->writeAttribute(value);
+ // TODO: check attribute count (avoid unfinished records)
}
}
};