diff --git a/makina-compiler/src/xyz/colinholzman/makina/Main.kt b/makina-compiler/src/xyz/colinholzman/makina/Main.kt index 16cf83b..571371d 100644 --- a/makina-compiler/src/xyz/colinholzman/makina/Main.kt +++ b/makina-compiler/src/xyz/colinholzman/makina/Main.kt @@ -14,7 +14,7 @@ fun main(args: Array) { try { val machine = Parse.file(file) - val outputDirectoryPath = options.outputDir ?: Paths.get(file).parent.toString() + val outputDirectoryPath = options.outputDir ?: (Paths.get(file).parent ?: ".").toString() val outputDirectory = File(outputDirectoryPath) if (!outputDirectory.exists()) outputDirectory.mkdirs()