Skip to content

Commit

Permalink
Fixes #125
Browse files Browse the repository at this point in the history
  • Loading branch information
dom96 committed Nov 24, 2015
1 parent ffbd5f5 commit 2ed0984
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/nimblepkg/tools.nim
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ 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()
Expand All @@ -36,8 +36,8 @@ template cd*(dir: string, body: stmt) =

proc getNimBin*: string =
result = "nim"
if findExe("nim") != "": result = "nim"
elif findExe("nimrod") != "": result = "nimrod"
if findExe("nim") != "": result = findExe("nim")
elif findExe("nimrod") != "": result = findExe("nimrod")

proc getNimrodVersion*: Version =
let nimBin = getNimBin()
Expand All @@ -53,7 +53,7 @@ proc samePaths*(p1, p2: string): bool =
var cp2 = if not p2.endsWith("/"): p2 & "/" else: p2
cp1 = cp1.replace('/', DirSep).replace('\\', DirSep)
cp2 = cp2.replace('/', DirSep).replace('\\', DirSep)

return cmpPaths(cp1, cp2) == 0

proc changeRoot*(origRoot, newRoot, path: string): string =
Expand Down Expand Up @@ -96,7 +96,7 @@ proc getDownloadDirName*(uri: string, verRange: VersionRange): string =
of strutils.Letters, strutils.Digits:
result.add i
else: discard

let verSimple = getSimpleString(verRange)
if verSimple != "":
result.add "_"
Expand Down

0 comments on commit 2ed0984

Please sign in to comment.