This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/master by this push:
new 78038299b6 GROOVY-8162: Update Groovysh to JLine3 (fix minor
regressions)
78038299b6 is described below
commit 78038299b61883d97835818f363fddb786ea728d
Author: Paul King <[email protected]>
AuthorDate: Fri Jul 25 16:52:20 2025 +1000
GROOVY-8162: Update Groovysh to JLine3 (fix minor regressions)
---
.../groovy/org/apache/groovy/groovysh/jline/GroovyCommands.groovy | 4 ++--
.../org/apache/groovy/groovysh/jline/GroovySystemRegistry.groovy | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git
a/subprojects/groovy-groovysh/src/main/groovy/org/apache/groovy/groovysh/jline/GroovyCommands.groovy
b/subprojects/groovy-groovysh/src/main/groovy/org/apache/groovy/groovysh/jline/GroovyCommands.groovy
index 2cbecc1171..3112107d49 100644
---
a/subprojects/groovy-groovysh/src/main/groovy/org/apache/groovy/groovysh/jline/GroovyCommands.groovy
+++
b/subprojects/groovy-groovysh/src/main/groovy/org/apache/groovy/groovysh/jline/GroovyCommands.groovy
@@ -129,6 +129,7 @@ class GroovyCommands extends JlineCommandRegistry
implements CommandRegistry {
}
checkArgCount(input, [0, 1, 2])
if (maybePrintHelp(input, '/grab')) return
+ def origDownloads = System.getProperty('groovy.grape.report.downloads')
try {
String arg = input.args()[0]
if (arg == '-l' || arg == '--list') {
@@ -172,7 +173,7 @@ class GroovyCommands extends JlineCommandRegistry
implements CommandRegistry {
} catch (Exception e) {
saveException(e)
} finally {
- System.setProperty('groovy.grape.report.downloads', 'false')
+ System.setProperty('groovy.grape.report.downloads', origDownloads)
}
return null
}
@@ -323,7 +324,6 @@ class GroovyCommands extends JlineCommandRegistry
implements CommandRegistry {
throw ignore
}
engine.put("_", out)
- printer.println(out)
}
Object getParser(String format, String parserName) {
diff --git
a/subprojects/groovy-groovysh/src/main/groovy/org/apache/groovy/groovysh/jline/GroovySystemRegistry.groovy
b/subprojects/groovy-groovysh/src/main/groovy/org/apache/groovy/groovysh/jline/GroovySystemRegistry.groovy
index e9ae808633..4d37f77d5e 100644
---
a/subprojects/groovy-groovysh/src/main/groovy/org/apache/groovy/groovysh/jline/GroovySystemRegistry.groovy
+++
b/subprojects/groovy-groovysh/src/main/groovy/org/apache/groovy/groovysh/jline/GroovySystemRegistry.groovy
@@ -41,12 +41,13 @@ class GroovySystemRegistry extends SystemRegistryImpl {
if (m.matches()) {
(target, line) = m[0][1,2]
}
- super.execute(line)
+ def result = super.execute(line)
if (target) {
consoleEngine().with {
putVariable(target, getVariable('_'))
}
}
+ result
}
@Override