Skip to content

Commit 85fae7b

Browse files
committed
method changed to no longer throw an exception in order to fix the build
1 parent 4bc24bd commit 85fae7b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/java/grails/util/Environment.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ public String getReloadLocation() {
338338
return location;
339339
}
340340
else {
341-
throw new IllegalStateException("Cannot check reload enabled, ["+RELOAD_LOCATION+"] or ["+BuildSettings.APP_BASE_DIR+"] not set! Specify the system property.") ;
341+
return "."; // default to the current directory
342342
}
343343
}
344344

@@ -352,6 +352,11 @@ public boolean hasReloadLocation() {
352352
private String getReloadLocationInternal() {
353353
String location = System.getProperty(RELOAD_LOCATION);
354354
if(!isNotBlank(location)) location = System.getProperty(BuildSettings.APP_BASE_DIR);
355+
if(!isNotBlank(location)) {
356+
BuildSettings settings = BuildSettingsHolder.getSettings();
357+
if(settings != null)
358+
location = settings.getBaseDir().getAbsolutePath();
359+
}
355360
return location;
356361
}
357362
}

0 commit comments

Comments
 (0)