new cmd: nim r main [args...] to compile & run, saving binary under $nimcache/main (#13382)

* implement `nim r main` to compile and run, saving binary to $nimcache
* remove outFileAbs for now
This commit is contained in:
Timothee Cour 2020-04-23 01:02:18 -07:00 • committed by GitHub
commit 5c534b2943
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 39 additions and 16 deletions

View file

@ -63,7 +63,7 @@ proc processCmdLine(pass: TCmdLinePass, cmd: string; config: ConfigRef) =
if processArgument(pass, p, argsCount, config): break
if pass == passCmd2:
if {optRun, optWasNimscript} * config.globalOptions == {} and
config.arguments.len > 0 and config.command.normalize notin ["run", "e"]:
config.arguments.len > 0 and config.command.normalize notin ["run", "e", "r"]:
rawMessage(config, errGenerated, errArgsNeedRunOption)
proc handleCmdLine(cache: IdentCache; conf: ConfigRef) =