compiler/commands: keep extension for output file (#10755)

Fixes #10747
This commit is contained in:
alaviss 2019-02-28 20:47:15 +07:00 • committed by Miran
commit 38aec488b7

View file

@ -388,7 +388,7 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
of "out", "o": of "out", "o":
expectArg(conf, switch, arg, pass, info) expectArg(conf, switch, arg, pass, info)
let f = splitFile(arg.expandTilde) let f = splitFile(arg.expandTilde)
conf.outFile = RelativeFile f.name conf.outFile = RelativeFile f.name & f.ext
conf.outDir = toAbsoluteDir f.dir conf.outDir = toAbsoluteDir f.dir
of "outdir": of "outdir":
expectArg(conf, switch, arg, pass, info) expectArg(conf, switch, arg, pass, info)