Don't prepend project path to absolute filenames passed to setCommand (#5341)

This commit is contained in:
nigredo-tori
2017-02-06 14:06:37 +07:00
committed by Andreas Rumpf
parent 072d79511f
commit 4c4f6541d9

View File

@@ -110,10 +110,13 @@ proc setupVM*(module: PSym; cache: IdentCache; scriptName: string;
let arg = a.getString 1
if arg.len > 0:
gProjectName = arg
let path =
if gProjectName.isAbsolute: gProjectName
else: gProjectPath / gProjectName
try:
gProjectFull = canonicalizePath(gProjectPath / gProjectName)
gProjectFull = canonicalizePath(path)
except OSError:
gProjectFull = gProjectName
gProjectFull = path
cbconf getCommand:
setResult(a, options.command)
cbconf switch: