From 243e8a658550f83fb8b411798ba2b3efae6a62da Mon Sep 17 00:00:00 2001 From: Lai Jiang Date: Fri, 24 Sep 2021 11:44:27 -0400 Subject: [PATCH] Remove mention of bazel run (#1340) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also provides a workaround in the error message. --- This change is [Reviewable](https://reviewable.io/reviews/google/nomulus/1340) --- core/src/main/java/google/registry/tools/CommandUtilities.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/google/registry/tools/CommandUtilities.java b/core/src/main/java/google/registry/tools/CommandUtilities.java index d53878a67..4b84d041e 100644 --- a/core/src/main/java/google/registry/tools/CommandUtilities.java +++ b/core/src/main/java/google/registry/tools/CommandUtilities.java @@ -53,7 +53,8 @@ class CommandUtilities { /** Prompts for yes/no input using promptText, defaulting to no. */ static boolean promptForYes(String promptText) { checkState( - System.console() != null, "Unable to access stdin (are you running with bazel run?)"); + System.console() != null, + "Unable to access stdin (are you running with `gradle registryTool`?), try using -f."); String input = System.console().readLine(promptText + " (y/N): "); // Null represents end-of-file (e.g. ^-D) so interpret that as a negative response. return input != null && Ascii.toUpperCase(input).startsWith("Y");