Fixes #301.
This commit is contained in:
parent
040189dfca
commit
2f45eab060
2 changed files with 11 additions and 7 deletions
|
|
@ -320,7 +320,7 @@ proc getPkgInfoFromFile*(file: NimbleFile, options: Options): PackageInfo =
|
|||
proc getPkgInfo*(dir: string, options: Options): PackageInfo =
|
||||
## Find the .nimble file in ``dir`` and parses it, returning a PackageInfo.
|
||||
let nimbleFile = findNimbleFile(dir, true)
|
||||
getPkgInfoFromFile(nimbleFile, options)
|
||||
return getPkgInfoFromFile(nimbleFile, options)
|
||||
|
||||
proc getInstalledPkgs*(libsDir: string, options: Options):
|
||||
seq[tuple[pkginfo: PackageInfo, meta: MetaData]] =
|
||||
|
|
@ -371,6 +371,10 @@ proc getInstalledPkgs*(libsDir: string, options: Options):
|
|||
proc isNimScript*(nf: string, options: Options): bool =
|
||||
result = readPackageInfo(nf, options).isNimScript
|
||||
|
||||
proc toFullInfo*(pkg: PackageInfo, options: Options): PackageInfo =
|
||||
assert(pkg.isMinimal, "Redundant call?")
|
||||
return getPkgInfoFromFile(pkg.mypath, options)
|
||||
|
||||
when isMainModule:
|
||||
validatePackageName("foo_bar")
|
||||
validatePackageName("f_oo_b_a_r")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue