Add binDir checking/auto creation. Fixes #215

This commit is contained in:
Jeff Ciesielski 2016-09-19 08:45:33 -04:00
commit e4838f4718

View file

@ -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,