This commit is contained in:
Dominik Picheta 2015-12-24 10:58:02 +00:00
commit 26d99d288e
3 changed files with 22 additions and 0 deletions

View file

@ -527,6 +527,10 @@ proc processDeps(pkginfo: PackageInfo, options: Options): seq[string] =
proc buildFromDir(pkgInfo: PackageInfo, paths: seq[string], forRelease: bool) =
## Builds a package as specified by ``pkgInfo``.
if pkgInfo.bin.len == 0:
raise newException(NimbleError,
"Nothing to build. Did you specify a module to build using the" &
" `bin` key in your .nimble file?")
let realDir = pkgInfo.getRealDir()
let releaseOpt = if forRelease: "-d:release" else: ""
var args = ""

View file

@ -0,0 +1,11 @@
# Package
version = "0.1.0"
author = "Dominik Picheta"
description = "Test for issue 108."
license = "BSD"
# Dependencies
requires "nim >= 0.12.1"

View file

@ -78,6 +78,13 @@ test "issue #126":
check exitCode1 != QuitSuccess
check "The .nimble file name must match name specified inside it." in lines1[^1]
test "issue #108":
cd "issue108":
let (output, exitCode) = execCmdEx("../" & path & " build")
let lines = output.strip.splitLines()
check exitCode != QuitSuccess
check "Nothing to build" in lines[^1]
test "can list":
check execCmdEx(path & " list").exitCode == QuitSuccess