From e4838f47185c3496afb4ba7cde6bf5efd39a2550 Mon Sep 17 00:00:00 2001 From: Jeff Ciesielski Date: Mon, 19 Sep 2016 08:45:33 -0400 Subject: [PATCH] Add binDir checking/auto creation. Fixes #215 --- src/nimble.nim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/nimble.nim b/src/nimble.nim index cb2d800..72e4790 100644 --- a/src/nimble.nim +++ b/src/nimble.nim @@ -313,6 +313,11 @@ proc buildFromDir(pkgInfo: PackageInfo, paths: seq[string], forRelease: bool) = let outputOpt = "-o:\"" & pkgInfo.getOutputDir(bin) & "\"" echo("Building ", pkginfo.name, "/", bin, " using ", pkgInfo.backend, " backend...") + + let outputDir = pkgInfo.getOutputDir("") + if not existsDir(outputDir): + createDir(outputDir) + try: doCmd(getNimBin() & " $# $# --noBabelPath $# $# \"$#\"" % [pkgInfo.backend, releaseOpt, args, outputOpt,