levy5307 commented on code in PR #914:
URL: https://github.com/apache/incubator-pegasus/pull/914#discussion_r889948029
##########
src/shell/command_utils.cpp:
##########
@@ -45,3 +45,35 @@ bool validate_ip(shell_context *sc,
err_info = fmt::format("invalid ip:port={}, can't find it in the cluster",
ip_str);
return false;
}
+
+bool confirm_unsafe_command(const std::string &action)
+{
+ const int max_attempts = 5;
+ int attempts = 0;
+ for (; attempts < max_attempts; ++attempts) {
Review Comment:
``` for (int attempts; attempts < max_attempts; ++attempts) ```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]