File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
src/main/groovy/com/marklogic/gradle/task Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -28,12 +28,16 @@ class DeleteModuleTimestampsFileTask extends MarkLogicTask {
2828 @TaskAction
2929 void deleteFile () {
3030 filePath = getAppConfig(). getModuleTimestampsPath()
31- File f = new File (filePath)
32- if (f. exists()) {
33- println " Deleting " + f. getAbsolutePath() + " \n "
34- f. delete()
35- } else {
36- println " Module timestamps file " + filePath + " does not exist, so not deleting"
37- }
31+ if (filePath != null && filePath. trim(). length() > 0 ) {
32+ File f = new File (filePath)
33+ if (f. exists()) {
34+ println " Deleting " + f. getAbsolutePath() + " \n "
35+ f. delete()
36+ } else {
37+ println " Module timestamps file " + filePath + " does not exist, so not deleting"
38+ }
39+ } else {
40+ println " Module timestamps file path is not set, so not attempting to delete"
41+ }
3842 }
3943}
You can’t perform that action at this time.
0 commit comments