Fixes #31
listPaths was using a non-cross-platform pattern in walkFiles.
This commit is contained in:
parent
8219bcb794
commit
fbeddd527c
1 changed files with 12 additions and 6 deletions
|
|
@ -451,12 +451,18 @@ proc listPaths(packages: seq[String]) =
|
||||||
for name in packages:
|
for name in packages:
|
||||||
var installed: seq[VersionAndPath] = @[]
|
var installed: seq[VersionAndPath] = @[]
|
||||||
# There may be several, list all available ones and sort by version.
|
# There may be several, list all available ones and sort by version.
|
||||||
for file in walkFiles(pkgsDir / name & "-*" / name & ".babel"):
|
for kind, path in walkDir(pkgsDir):
|
||||||
var pkgInfo = getPkgInfo(splitFile(file).dir)
|
if kind != pcDir or not path.startsWith(pkgsDir / name): continue
|
||||||
|
|
||||||
|
let babelFile = path / name.addFileExt("babel")
|
||||||
|
if existsFile(babelFile):
|
||||||
|
var pkgInfo = getPkgInfo(path)
|
||||||
var v: VersionAndPath
|
var v: VersionAndPath
|
||||||
v.version = newVersion(pkgInfo.version)
|
v.version = newVersion(pkgInfo.version)
|
||||||
v.path = pkgsDir / (pkgInfo.name & '-' & pkgInfo.version)
|
v.path = pkgsDir / (pkgInfo.name & '-' & pkgInfo.version)
|
||||||
installed.add(v)
|
installed.add(v)
|
||||||
|
else:
|
||||||
|
echo "Warning: No .babel file found for ", path
|
||||||
|
|
||||||
if installed.len > 0:
|
if installed.len > 0:
|
||||||
sort(installed, system.cmp[VersionAndPath], Descending)
|
sort(installed, system.cmp[VersionAndPath], Descending)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue