diff --git a/src/babel.nim b/src/babel.nim index 3906b49..da2b493 100644 --- a/src/babel.nim +++ b/src/babel.nim @@ -409,14 +409,12 @@ proc getBabelTempDir(): string = proc downloadPkg(url: string, verRange: PVersionRange, downMethod: TDownloadMethod): string = let downloadDir = (getBabelTempDir() / getDownloadDirName(url, verRange)) - createDir(downloadDir.extractFilename) echo("Downloading ", url, " into ", downloadDir, " using ", downMethod, "...") doDownload(url, downloadDir, verRange, downMethod) result = downloadDir proc downloadPkg(pkg: TPackage, verRange: PVersionRange): string = let downloadDir = (getBabelTempDir() / getDownloadDirName(pkg, verRange)) - createDir(downloadDir.extractFilename) let downMethod = pkg.downloadMethod.getDownloadMethod() echo("Downloading ", pkg.name, " into ", downloadDir, " using ", downMethod, "...") doDownload(pkg.url, downloadDir, verRange, downMethod) diff --git a/tests/tester.nim b/tests/tester.nim index a8b5afb..97e141f 100644 --- a/tests/tester.nim +++ b/tests/tester.nim @@ -12,11 +12,10 @@ test "can reject same version dependencies": let (outp, exitCode) = execCmdEx(path & " install -y https://github.com/babel-test/packagebin.git") #echo outp # TODO: outp is not in the correct order. - let ls = outp.splitLines() + let ls = outp.strip.splitLines() check exitCode != QuitSuccess - check ls[ls.len-2] == "Error: unhandled exception: Cannot satisfy the dependency on PackageA 0.2.0 and PackageA 0.5.0 [EBabel]" - # Last is ""? TODO + check ls[ls.len-1] == "Error: unhandled exception: Cannot satisfy the dependency on PackageA 0.2.0 and PackageA 0.5.0 [EBabel]" test "can update": let (outp, exitCode) = execCmdEx(path & " update") - check exitCode == QuitSuccess \ No newline at end of file + check exitCode == QuitSuccess