EdColeman commented on code in PR #3680:
URL: https://github.com/apache/accumulo/pull/3680#discussion_r1290061014


##########
shell/src/main/java/org/apache/accumulo/shell/commands/ConfigCommand.java:
##########
@@ -436,4 +449,18 @@ public Options getOptions() {
   public int numArgs() {
     return 0;
   }
+
+  /**
+   * Determine is force is set as an option or user enters (y | yes) on the 
shell prompt.
+   *
+   * @return true if force is set as opt or y | yes entered at command line.
+   */
+  private boolean forceSet(final Shell shellState, final CommandLine cl, final 
String prompt) {
+    if (cl.hasOption(forceOpt)) {
+      return true;
+    }
+    shellState.getWriter().flush();
+    String line = shellState.getReader().readLine(prompt + " (yes|no)? ");
+    return line != null && (line.equalsIgnoreCase("y") || 
line.equalsIgnoreCase("yes"));

Review Comment:
   I would prefer to do that as a separate PR. The code was copied / modified 
from delete table.  I will do this as a follow-on,



-- 
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]

Reply via email to