diff --git a/.gitignore b/.gitignore index 95d95ca1158a..aa7fd2164774 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,8 @@ classes/ tests/partest-generated/ tests/locks/ /test-classes/ + + +# Ignore output files but keep the directory +out/ +!out/.keep diff --git a/test/dotc/build.scala b/test/dotc/build.scala index 9f47796c3fe2..2963b8f1e9c1 100644 --- a/test/dotc/build.scala +++ b/test/dotc/build.scala @@ -21,6 +21,8 @@ object build extends tests { def main(args: Array[String]): Unit = { println("------------ Building dotty ------------") deleteFilesInFolder(new File(defaultOutputDir)) // clear previous output + val keepFile = new File(defaultOutputDir + ".keep") + keepFile.createNewFile() dotty // build output dir val p = Runtime.getRuntime.exec(Array("jar", "cf", "dotty.jar", "-C", "out", ".")) p.waitFor()