diff --git a/compiler/scriptconfig.nim b/compiler/scriptconfig.nim index 245680eecd..9e94f1c19e 100644 --- a/compiler/scriptconfig.nim +++ b/compiler/scriptconfig.nim @@ -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: