Handle duplicated --printresult arguments.
This commit is contained in:
parent
84b2d8812c
commit
6c62ee9f1a
|
@ -18,7 +18,12 @@ int main(int argc, char* argv[]) {
|
|||
for (signed int i = 0; i < argc; ++i)
|
||||
{
|
||||
currentArg = static_cast<string_view>(argv[i]);
|
||||
if ((currentArg == "--printresult") || (currentArg == "-p")) printResult = true;
|
||||
if ((currentArg == "--printresult") || (currentArg == "-p")) {
|
||||
if (printResult) {
|
||||
cout << "ERROR: --printresult was specified two times" << '\n';
|
||||
exit(EXIT_SUCCESS);
|
||||
} else printResult = true;
|
||||
}
|
||||
else if (currentArg.starts_with("--target=")) {
|
||||
currentArg.remove_prefix(9);
|
||||
(target = '.') += currentArg;
|
||||
|
|
Loading…
Reference in New Issue