echo cmd | nim r - -arg1 -arg2 now works (#14210)

This commit is contained in:
Timothee Cour 2020-05-04 02:27:59 -07:00 • committed by GitHub
commit f115e40e6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 2 deletions

View file

@ -52,7 +52,7 @@ proc processCmdLine(pass: TCmdLinePass, cmd: string; config: ConfigRef) =
config.commandLine.add ':'
config.commandLine.add p.val.quoteShell
if p.key == " ":
if p.key == "": # `-` was passed to indicate main project is stdin
p.key = "-"
if processArgument(pass, p, argsCount, config): break
else: