Merge pull request #207 from yglukhov/symlink-issue

Fixes symlink installation issue
This commit is contained in:
Dominik Picheta 2016-02-15 12:11:13 +00:00
commit 7b47ebc8a2
4 changed files with 20 additions and 1 deletions

View file

@ -413,7 +413,7 @@ proc installFromDir(dir: string, latest: bool, options: Options,
when defined(unix):
# TODO: Verify that we are removing an old bin of this package, not
# some other package's binary!
if existsFile(binDir / bin): removeFile(binDir / cleanBin)
if existsFile(binDir / cleanBin): removeFile(binDir / cleanBin)
echo("Creating symlink: ", pkgDestDir / bin, " -> ", binDir / cleanBin)
createSymlink(pkgDestDir / bin, binDir / cleanBin)
elif defined(windows):

View file

@ -0,0 +1,2 @@
echo "Hello"

View file

@ -0,0 +1,10 @@
# Package
version = "0.1.0"
author = "Yuriy Glukhov"
description = "Test package for Issue 206"
license = "BSD"
bin = @["issue/issue206bin"]
# Dependencies
requires "nimrod >= 0.9.3"

View file

@ -179,6 +179,13 @@ test "issue #108":
check exitCode != QuitSuccess
check "Nothing to build" in lines[^1]
test "issue #206":
cd "issue206":
var (output, exitCode) = execCmdEx("../" & path & " install -y")
check exitCode == QuitSuccess
(output, exitCode) = execCmdEx("../" & path & " install -y")
check exitCode == QuitSuccess
test "can list":
check execCmdEx(path & " list").exitCode == QuitSuccess