refactoring: removed cmdlinehelper.mainCommand callback
This commit is contained in:
parent
c2c7f60259
commit
3492178494
5 changed files with 32 additions and 32 deletions
|
|
@ -208,8 +208,7 @@ proc processCmdLine*(pass: TCmdLinePass, cmd: string; conf: ConfigRef) =
|
|||
proc handleCmdLine(cache: IdentCache; conf: ConfigRef) =
|
||||
let self = NimProg(
|
||||
suggestMode: true,
|
||||
processCmdLine: processCmdLine,
|
||||
mainCommand: mainCommand
|
||||
processCmdLine: processCmdLine
|
||||
)
|
||||
self.initDefinesProg(conf, "nimfind")
|
||||
|
||||
|
|
@ -228,6 +227,8 @@ proc handleCmdLine(cache: IdentCache; conf: ConfigRef) =
|
|||
if not dirExists(conf.prefixDir / RelativeDir"lib"):
|
||||
conf.prefixDir = AbsoluteDir""
|
||||
|
||||
discard self.loadConfigsAndRunMainCommand(cache, conf)
|
||||
var graph = newModuleGraph(cache, conf)
|
||||
if self.loadConfigsAndRunMainCommand(cache, conf, graph):
|
||||
mainCommand(graph)
|
||||
|
||||
handleCmdLine(newIdentCache(), newConfigRef())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue