Package names are case insensitive (#190)
This commit is contained in:
parent
04df41215b
commit
8abf18633d
1 changed files with 2 additions and 2 deletions
|
|
@ -142,7 +142,7 @@ proc getPackage*(pkg: string, options: Options,
|
||||||
let packages = parseFile(options.getNimbleDir() /
|
let packages = parseFile(options.getNimbleDir() /
|
||||||
"packages_" & name.toLower() & ".json")
|
"packages_" & name.toLower() & ".json")
|
||||||
for p in packages:
|
for p in packages:
|
||||||
if p["name"].str == pkg:
|
if normalize(p["name"].str) == normalize(pkg):
|
||||||
resPkg = p.fromJson()
|
resPkg = p.fromJson()
|
||||||
return true
|
return true
|
||||||
|
|
||||||
|
|
@ -302,4 +302,4 @@ when isMainModule:
|
||||||
doAssert toValidPackageName("foo__bar") == "foo_bar"
|
doAssert toValidPackageName("foo__bar") == "foo_bar"
|
||||||
doAssert toValidPackageName("jhbasdh!£$@%#^_&*_()qwe") == "jhbasdh_qwe"
|
doAssert toValidPackageName("jhbasdh!£$@%#^_&*_()qwe") == "jhbasdh_qwe"
|
||||||
|
|
||||||
echo("All tests passed!")
|
echo("All tests passed!")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue