Fixed out-of-order problems in the automated unit tests
This commit is contained in:
parent
1ba199a1f6
commit
f4c052eaca
3 changed files with 46 additions and 11 deletions
|
|
@ -596,9 +596,9 @@ proc downloadPkg(pkg: Package, verRange: VersionRangeRef): string =
|
|||
proc install(packages: seq[PkgTuple],
|
||||
options: Options,
|
||||
doPrompt = true): tuple[paths: seq[string], pkg: PackageInfo] =
|
||||
if packages == @[]:
|
||||
if packages == @[]:
|
||||
result = installFromDir(getCurrentDir(), false, options, "")
|
||||
else:
|
||||
else:
|
||||
# If packages.json is not present ask the user if they want to download it.
|
||||
if not existsFile(options.getNimbleDir / "packages.json"):
|
||||
if doPrompt and
|
||||
|
|
|
|||
|
|
@ -9,8 +9,13 @@ proc doCmd*(cmd: string) =
|
|||
let bin = cmd.split(' ')[0]
|
||||
if findExe(bin) == "":
|
||||
raise newException(NimbleError, "'" & bin & "' not in PATH.")
|
||||
|
||||
# To keep output in sequence
|
||||
stdout.flushFile()
|
||||
stderr.flushFile()
|
||||
|
||||
let exitCode = execCmd(cmd)
|
||||
|
||||
if exitCode != QuitSuccess:
|
||||
raise newException(NimbleError,
|
||||
"Execution failed with exit code " & $exitCode)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue