commit
21c8457a8c
2 changed files with 3 additions and 3 deletions
|
|
@ -232,7 +232,7 @@ proc removeRevDep(options: Options, pkg: PackageInfo) =
|
||||||
for key, val in options.nimbleData["reverseDeps"]:
|
for key, val in options.nimbleData["reverseDeps"]:
|
||||||
options.remove(pkg, depTup, val)
|
options.remove(pkg, depTup, val)
|
||||||
else:
|
else:
|
||||||
let thisDep = options.nimbleData["reverseDeps"][depTup.name]
|
let thisDep = options.nimbleData{"reverseDeps", depTup.name}
|
||||||
if thisDep.isNil: continue
|
if thisDep.isNil: continue
|
||||||
options.remove(pkg, depTup, thisDep)
|
options.remove(pkg, depTup, thisDep)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -118,6 +118,7 @@ proc readPackageInfoFromNimble(path: string; result: var PackageInfo) =
|
||||||
if fs != nil:
|
if fs != nil:
|
||||||
var p: CfgParser
|
var p: CfgParser
|
||||||
open(p, fs, path)
|
open(p, fs, path)
|
||||||
|
defer: close(p)
|
||||||
var currentSection = ""
|
var currentSection = ""
|
||||||
while true:
|
while true:
|
||||||
var ev = next(p)
|
var ev = next(p)
|
||||||
|
|
@ -172,7 +173,6 @@ proc readPackageInfoFromNimble(path: string; result: var PackageInfo) =
|
||||||
"Invalid package info, should not contain --" & ev.value)
|
"Invalid package info, should not contain --" & ev.value)
|
||||||
of cfgError:
|
of cfgError:
|
||||||
raise newException(NimbleError, "Error parsing .nimble file: " & ev.msg)
|
raise newException(NimbleError, "Error parsing .nimble file: " & ev.msg)
|
||||||
close(p)
|
|
||||||
else:
|
else:
|
||||||
raise newException(ValueError, "Cannot open package info: " & path)
|
raise newException(ValueError, "Cannot open package info: " & path)
|
||||||
|
|
||||||
|
|
@ -269,4 +269,4 @@ proc getInstalledPkgs*(libsDir: string, options: Options):
|
||||||
raise exc
|
raise exc
|
||||||
|
|
||||||
proc isNimScript*(nf: string, options: Options): bool =
|
proc isNimScript*(nf: string, options: Options): bool =
|
||||||
result = readPackageInfo(nf, options).isNimScript
|
result = readPackageInfo(nf, options).isNimScript
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue