From e897278323ff184609c92a2d2851152311a118ca Mon Sep 17 00:00:00 2001 From: Matt Soucy Date: Thu, 27 Aug 2020 20:50:15 -0400 Subject: [PATCH] Ignore output directory --- src/main/kotlin/me/msoucy/gbat/Main.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/me/msoucy/gbat/Main.kt b/src/main/kotlin/me/msoucy/gbat/Main.kt index 692fc04..4424cfe 100644 --- a/src/main/kotlin/me/msoucy/gbat/Main.kt +++ b/src/main/kotlin/me/msoucy/gbat/Main.kt @@ -80,11 +80,10 @@ class GbatArgs(parser: ArgParser) { fun main(args: Array) = mainBody { ArgParser(args).parseInto(::GbatArgs).run { val outDir = File(output) - if (outDir.isDirectory) { - // throw InvalidArgumentException("Output directory already exists") - } + outDir.delete() outDir.mkdirs() + File(outDir, ".gitignore").writeText("*") fun parse_interesting(theList: List) = theList.map {