diff --git a/compiler/src/prog8/CompilerMain.kt b/compiler/src/prog8/CompilerMain.kt index 67838b04c..f415ee506 100644 --- a/compiler/src/prog8/CompilerMain.kt +++ b/compiler/src/prog8/CompilerMain.kt @@ -106,10 +106,7 @@ private fun compileMain(args: Array): Boolean { } val outputPath = pathFrom(outputDir) - if(!outputPath.toFile().isDirectory) { - System.err.println("Output path doesn't exist") - return false - } + outputPath.createDirectories() if(profilingInstrumentation==true && compilationTarget!=Cx16Target.NAME) { System.err.println("Profiling instrumentation is only available on the cx16 target.") diff --git a/docs/source/compiling.rst b/docs/source/compiling.rst index 0617722a7..f563bcb6e 100644 --- a/docs/source/compiling.rst +++ b/docs/source/compiling.rst @@ -231,7 +231,7 @@ One or more .p8 module files So you have to make sure these are provided somewhere in the alternate source path. ``-out `` - sets directory location for output files instead of current directory + Sets directory location for output files instead of current directory. Creates it if it doesn't exist yet. ``-plaintext`` Prints output messages in plain text: no colors or fancy symbols.