Skip to content

Commit

Permalink
Fixed default output directory when input is just file name.
Browse files Browse the repository at this point in the history
  • Loading branch information
clnhlzmn committed Mar 22, 2021
1 parent 99d158b commit bba922a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion makina-compiler/src/xyz/colinholzman/makina/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fun main(args: Array<String>) {
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()
Expand Down

0 comments on commit bba922a

Please sign in to comment.