Skip to content

Commit 2fc7f5f

Browse files
committed
#428 Ensuring the property exists before checking it
1 parent fb1a852 commit 2fc7f5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/groovy/com/marklogic/gradle/MarkLogicPlugin.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ class MarkLogicPlugin implements Plugin<Project> {
349349
DefaultAppConfigFactory appConfigFactory = new DefaultAppConfigFactory(propertySource)
350350
// The ConfigDir objects constructed by AppConfig must all be relative to the project directory
351351
// when using Java 11. In case this causes problems, a user can disable this via the below property
352-
if ("true".equals(project.property("mlIgnoreProjectDir"))) {
352+
if (project.hasProperty("mlIgnoreProjectDir") && "true".equals(project.property("mlIgnoreProjectDir"))) {
353353
println "The Gradle projectDir will not be used to resolve file paths"
354354
} else {
355355
appConfigFactory.setProjectDir(project.getProjectDir())

0 commit comments

Comments
 (0)