Skip to content

Commit eb8d5bb

Browse files
GRAILS-6400 - don't prompt the user with corrected script names if running in non-interactive mode
1 parent 9b80250 commit eb8d5bb

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/java/org/codehaus/groovy/grails/cli/GrailsScriptRunner.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -563,12 +563,16 @@ private int callPluginOrGrailsScript(String scriptName) {
563563
loadScriptClass(gant, scriptName);
564564
}
565565
catch (ScriptNotFoundException e) {
566-
String fixedName = fixScriptName(scriptName, allScripts);
567-
if (fixedName == null) {
566+
if(isInteractive) {
567+
String fixedName = fixScriptName(scriptName, allScripts);
568+
if (fixedName == null) {
569+
throw e;
570+
}
571+
572+
loadScriptClass(gant, fixedName);
573+
} else {
568574
throw e;
569575
}
570-
571-
loadScriptClass(gant, fixedName);
572576
}
573577

574578
return executeWithGantInstance(gant, doNothingClosure);

0 commit comments

Comments
 (0)