add test for --eval; fix a minor bug (#16224)

This commit is contained in:
Timothee Cour 2020-12-01 21:09:08 -08:00 • committed by GitHub
commit 84f2ad3068
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View file

@ -450,6 +450,7 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
conf.projectIsCmd = true
conf.cmdInput = arg # can be empty (a nim file with empty content is valid too)
if conf.cmd == cmdNone:
conf.command = "e"
conf.setCmd cmdNimscript # better than `cmdCrun` as a default
conf.implicitCmd = true
of "path", "p":