diff --git a/compiler/nim.nim b/compiler/nim.nim index 35afecf205..c458f76f9a 100644 --- a/compiler/nim.nim +++ b/compiler/nim.nim @@ -54,7 +54,8 @@ proc handleCmdLine(cache: IdentCache) = except OSError: gProjectFull = gProjectName let p = splitFile(gProjectFull) - gProjectPath = canonicalizePath p.dir + let dir = if p.dir.len > 0: p.dir else: getCurrentDir() + gProjectPath = canonicalizePath dir gProjectName = p.name else: gProjectPath = canonicalizePath getCurrentDir()