Skip to content

Commit

Permalink
Create --outdir if it doesn't exist, and error out quickly if we can't.
Browse files Browse the repository at this point in the history
  • Loading branch information
w1bw committed Apr 28, 2016
1 parent 9455176 commit c0c71d9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main/scala/org/broadinstitute/pilon/Pilon.scala
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,14 @@ object Pilon {
optionParse(args.toList)

if (outdir != "") {
// TODO: should create directory if it doesn't exist
val dir = new File(outdir)
dir.mkdirs
if (!dir.exists) {
println("Unable to create output directory " + outdir)
sys.exit(1)
}
}

setDefaultParallelism(threads)

// Stray computation is expensive up front, so only turn it on
Expand Down

0 comments on commit c0c71d9

Please sign in to comment.