Skip to content

Commit

Permalink
Grails Bootstrap: Update BuildSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
rainboyan committed May 26, 2023
1 parent 2b55944 commit 7d1c397
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,13 @@ class BuildSettings {
GRAILS_APP_DIR = new File(BASE_DIR, 'grails-app')
}
}
GRAILS_APP_PATH = GRAILS_APP_DIR.absolutePath.substring(GRAILS_APP_DIR.absolutePath.lastIndexOf(File.separator) + 1)
GRAILS_APP_DIR_PRESENT = GRAILS_APP_DIR.exists()
GRAILS_APP_DIR_PRESENT = GRAILS_APP_DIR?.exists()
if (GRAILS_APP_DIR_PRESENT) {
GRAILS_APP_PATH = GRAILS_APP_DIR.absolutePath.substring(GRAILS_APP_DIR.absolutePath.lastIndexOf(File.separator) + 1)
}
else {
GRAILS_APP_PATH = ''
}

String projectTargetDir = System.getProperty(PROJECT_TARGET_DIR)
if (projectTargetDir) {
Expand Down

0 comments on commit 7d1c397

Please sign in to comment.