Skip to content

Commit 060736d

Browse files
committed
correctly propagate isInteractive system property
1 parent f26f016 commit 060736d

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

grails-bootstrap/src/main/groovy/grails/build/logging/GrailsConsole.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public void setOut(PrintStream out) {
179179
this.out = out;
180180
}
181181

182-
private boolean isInteractiveEnabled() {
182+
public boolean isInteractiveEnabled() {
183183
return readPropOrTrue(ENABLE_INTERACTIVE);
184184
}
185185

grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/cli/GrailsScriptRunner.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ public class GrailsScriptRunner {
8383
private BuildSettings settings;
8484

8585
private PrintStream out = System.out;
86-
private boolean isInteractive = true;
87-
private URLClassLoader classLoader;
8886
private GrailsConsole console = GrailsConsole.getInstance();
87+
private boolean isInteractive = console.isInteractiveEnabled();
88+
private URLClassLoader classLoader;
8989

9090
private File scriptCacheDir;
9191
private final List<File> scriptsAllowedOutsideOfProject = new ArrayList<File>();
@@ -338,6 +338,7 @@ public int executeCommand(String scriptName, String args, String env) {
338338

339339
CommandLineParser parser = getCommandLineParser();
340340
DefaultCommandLine commandLine = (DefaultCommandLine) parser.parseString(scriptName,args);
341+
setInteractive(!commandLine.hasOption(CommandLine.NON_INTERACTIVE_ARGUMENT));
341342
if (env != null) {
342343
commandLine.setEnvironment(env);
343344
}

grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/resolve/PluginInstallEngine.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class PluginInstallEngine {
5858
*/
5959
List installedPlugins = []
6060
def pluginDirVariableStore = [:]
61-
boolean isInteractive = true
61+
boolean isInteractive = GrailsConsole.getInstance().isInteractiveEnabled()
6262

6363
protected Metadata metadata
6464
protected PluginBuildSettings pluginSettings

0 commit comments

Comments
 (0)