!341 option -p 无对应value时,会将后边连接的option当作value,提示option错误

Merge pull request !341 from WenqiangZhao/master
This commit is contained in:
openharmony_ci 2023-07-11 08:02:46 +00:00 committed by Gitee
commit 42dd9b3ecc
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -121,8 +121,8 @@ bool GetOptionValue(argsVector &args, std::string optionName, T &value)
return true;
} else {
// have value but convert failed.
printf("incorrect option value '%s'. View the usage with the --help option.\n",
(*it).c_str());
printf("incorrect option value '%s' for option '%s'. View the usage with the --help option.\n",
(*it).c_str(), optionName.c_str());
return false;
}
}