[bugfix] fix nimpretty for absolute paths (#11480)

This commit is contained in:
Jasper Jenkins
2019-06-12 02:59:26 -07:00
committed by Miran
parent b056d32a79
commit da035e9c83

View File

@@ -49,7 +49,9 @@ type
proc prettyPrint(infile, outfile: string, opt: PrettyOptions) =
var conf = newConfigRef()
let fileIdx = fileInfoIdx(conf, AbsoluteFile infile)
conf.outFile = RelativeFile outfile
let f = splitFile(outfile.expandTilde)
conf.outFile = RelativeFile f.name & f.ext
conf.outDir = toAbsoluteDir f.dir
var p: TParsers
p.parser.em.indWidth = opt.indWidth
if setupParsers(p, fileIdx, newIdentCache(), conf):