From 2c11e768ea84434ea1f25a3e9499d47ff4ad0f4e Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Tue, 2 Jan 2018 18:27:30 -0800 Subject: [PATCH] Added check to see if location directory exists. --- .../net/thauvin/erik/kobalt/plugin/pom2xml/Pom2XmlPlugin.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/net/thauvin/erik/kobalt/plugin/pom2xml/Pom2XmlPlugin.kt b/src/main/kotlin/net/thauvin/erik/kobalt/plugin/pom2xml/Pom2XmlPlugin.kt index edbb137..a12dd47 100644 --- a/src/main/kotlin/net/thauvin/erik/kobalt/plugin/pom2xml/Pom2XmlPlugin.kt +++ b/src/main/kotlin/net/thauvin/erik/kobalt/plugin/pom2xml/Pom2XmlPlugin.kt @@ -70,7 +70,7 @@ class Pom2XmlPlugin @Inject constructor(private val configActor: ConfigActor if (config.name.isNotBlank()) { val loc = File(config.loc + if (config.loc.endsWith(File.separator)) "" else File.separator) - if (loc.isDirectory) { + if (loc.exists() && loc.isDirectory) { // Write POM File(loc, config.name).writeText(context.generatePom(project)) } else {