accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject [accumulo] 01/01: adds bare passwd to shell help #1322
Date Tue, 13 Aug 2019 20:01:08 GMT
This is an automated email from the ASF dual-hosted git repository.

kturner pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo.git

commit e604ec49e4e67e6256450c4b1df0c38c7508278a
Author: Keith Turner <kturner@apache.org>
AuthorDate: Tue Aug 13 16:00:42 2019 -0400

    adds bare passwd to shell help #1322
---
 shell/src/main/java/org/apache/accumulo/shell/Shell.java          | 3 ++-
 shell/src/main/java/org/apache/accumulo/shell/ShellOptionsJC.java | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/shell/src/main/java/org/apache/accumulo/shell/Shell.java b/shell/src/main/java/org/apache/accumulo/shell/Shell.java
index 0074adb..a4176cb 100644
--- a/shell/src/main/java/org/apache/accumulo/shell/Shell.java
+++ b/shell/src/main/java/org/apache/accumulo/shell/Shell.java
@@ -44,6 +44,7 @@ import java.util.TreeMap;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.Constants;
+import org.apache.accumulo.core.cli.ClientOpts.PasswordConverter;
 import org.apache.accumulo.core.client.Accumulo;
 import org.apache.accumulo.core.client.AccumuloClient;
 import org.apache.accumulo.core.client.AccumuloException;
@@ -329,7 +330,7 @@ public class Shell extends ShellOptions implements KeywordExecutable {
         Runtime.getRuntime()
             .addShutdownHook(new Thread(() -> reader.getTerminal().setEchoEnabled(true)));
         // Read password if the user explicitly asked for it, or didn't specify anything
at all
-        if ("stdin".equals(password) || password == null) {
+        if (PasswordConverter.STDIN.equals(password) || password == null) {
           password = reader.readLine("Password: ", '*');
         }
         if (password == null) {
diff --git a/shell/src/main/java/org/apache/accumulo/shell/ShellOptionsJC.java b/shell/src/main/java/org/apache/accumulo/shell/ShellOptionsJC.java
index e2985f5..c7c0ddf 100644
--- a/shell/src/main/java/org/apache/accumulo/shell/ShellOptionsJC.java
+++ b/shell/src/main/java/org/apache/accumulo/shell/ShellOptionsJC.java
@@ -42,7 +42,7 @@ public class ShellOptionsJC {
 
   // Note: Don't use "password = true" because then it will prompt even if we have a token
   @Parameter(names = {"-p", "--password"},
-      description = "password (can be specified as 'pass:<password>',"
+      description = "password (can be specified as '<password>', 'pass:<password>',"
           + " 'file:<local file containing the password>', 'env:<variable containing"
           + " the pass>', or stdin)",
       converter = ClientOpts.PasswordConverter.class)


Mime
View raw message