jamesfredley commented on code in PR #15367:
URL: https://github.com/apache/grails-core/pull/15367#discussion_r2748563078
##########
grails-bootstrap/src/main/groovy/grails/build/logging/GrailsConsole.java:
##########
@@ -674,7 +661,7 @@ private void logSimpleError(String msg) {
}
public boolean isAnsiEnabled() {
- return Ansi.isEnabled() && (terminal != null &&
terminal.isAnsiSupported()) && ansiEnabled;
+ return Ansi.isEnabled() && (terminal != null && terminal.getType() !=
Terminal.TYPE_DUMB) && ansiEnabled;
Review Comment:
Fixed: Changed to use "dumb".equals(terminal.getType()) instead of
Terminal.TYPE_DUMB.
##########
grails-bootstrap/src/main/groovy/grails/build/logging/GrailsConsole.java:
##########
@@ -190,19 +187,12 @@ protected void initialize(InputStream systemIn,
PrintStream systemOut, PrintStre
redirectSystemOutAndErr(true);
- System.setProperty(ShutdownHooks.JLINE_SHUTDOWNHOOK, "false");
-
if (isInteractiveEnabled()) {
- reader = createConsoleReader(systemIn);
- reader.setBellEnabled(false);
- reader.setCompletionHandler(new CandidateListCompletionHandler());
- if (isActivateTerminal()) {
- terminal = createTerminal();
- }
-
+ terminal = createTerminal();
+ reader = createLineReader(terminal);
history = prepareHistory();
if (history != null) {
- reader.setHistory(history);
+ reader.setVariable(LineReader.HISTORY_FILE, new
File(System.getProperty("user.home"), HISTORYFILE).toPath());
Review Comment:
Fixed: History is now properly attached to the LineReader via
LineReaderBuilder.history() and the history file path is set via
builder.variable().
--
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]