Fixes #108.
This commit is contained in:
parent
96ddb12da8
commit
26d99d288e
3 changed files with 22 additions and 0 deletions
|
|
@ -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 = ""
|
||||
|
|
|
|||
11
tests/issue108/issue108.nimble
Normal file
11
tests/issue108/issue108.nimble
Normal 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"
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue