File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed
Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,8 @@ proc nimbleLockExists(config: ConfigRef): bool =
4848 return fileExists (pd.string / nimbleLock)
4949
5050proc processCmdLine (pass: TCmdLinePass , cmd: string ; config: ConfigRef ) =
51- var p = parseopt.initOptParser (cmd)
51+ var p = if cmd.len == 0 : parseopt.initOptParser ()
52+ else : parseopt.initOptParser (cmd)
5253 var argsCount = 0
5354
5455 config.commandLine.setLen 0
Original file line number Diff line number Diff line change @@ -1208,7 +1208,8 @@ proc mainCommand(graph: ModuleGraph) =
12081208 genSuccessX (graph.config)
12091209
12101210proc processCmdLine (pass: TCmdLinePass , cmd: string ; config: ConfigRef ) =
1211- var p = parseopt.initOptParser (cmd)
1211+ var p = if cmd.len == 0 : parseopt.initOptParser ()
1212+ else : parseopt.initOptParser (cmd)
12121213 var argsCount = 1
12131214
12141215 config.commandLine.setLen 0
Original file line number Diff line number Diff line change @@ -668,7 +668,8 @@ proc mainCommand(graph: ModuleGraph) =
668668 close (results)
669669
670670proc processCmdLine * (pass: TCmdLinePass , cmd: string ; conf: ConfigRef ) =
671- var p = parseopt.initOptParser (cmd)
671+ var p = if cmd.len == 0 : parseopt.initOptParser ()
672+ else : parseopt.initOptParser (cmd)
672673 var findProject = false
673674 while true :
674675 parseopt.next (p)
You can’t perform that action at this time.
0 commit comments