diff --git a/babel.nim b/babel.nim index 2511324..3a6423b 100644 --- a/babel.nim +++ b/babel.nim @@ -242,9 +242,10 @@ proc installFromDir(dir: string, latest: bool): string = # Dependencies need to be processed before the creation of the pkg dir. let paths = processDeps(pkginfo) + if pkgInfo.bin.len > 0: buildFromDir(pkgInfo, paths) + createDir(pkgDestDir) if pkgInfo.bin.len > 0: - buildFromDir(pkgInfo, paths) createDir(binDir) # Copy all binaries and files that are not skipped copyFilesRec(realDir, realDir, pkgDestDir, pkgInfo) diff --git a/tools.nim b/tools.nim index e82d98c..0a45a74 100644 --- a/tools.nim +++ b/tools.nim @@ -3,14 +3,14 @@ # # Various miscellaneous utility functions reside here. import osproc, pegs, strutils, os -import version +import version, common # TODO: Merge with common.nim? proc doCmd*(cmd: string) = let exitCode = execCmd(cmd) if exitCode != QuitSuccess: - quit("Execution failed with exit code " & $exitCode, QuitFailure) + raise newException(EBabel, "Execution failed with exit code " & $exitCode) template cd*(dir: string, body: stmt) = ## Sets the current dir to ``dir``, executes ``body`` and restores the