Merge pull request #3873 from yglukhov/path-handling

Fixes #3871
This commit is contained in:
Andreas Rumpf 2016-02-16 19:42:05 +01:00
commit 2e3c403d2b
3 changed files with 13 additions and 1 deletions

View file

@ -327,7 +327,7 @@ proc processSwitch(switch, arg: string, pass: TCmdLinePass, info: TLineInfo) =
lists.excludePath(options.lazyPaths, strippedPath) lists.excludePath(options.lazyPaths, strippedPath)
of "nimcache": of "nimcache":
expectArg(switch, arg, pass, info) expectArg(switch, arg, pass, info)
options.nimcacheDir = processPath(arg) options.nimcacheDir = processPath(arg, true)
of "out", "o": of "out", "o":
expectArg(switch, arg, pass, info) expectArg(switch, arg, pass, info)
options.outFile = arg options.outFile = arg

View file

@ -731,6 +731,8 @@ proc callCCompiler*(projectfile: string) =
builddll = "" builddll = ""
if options.outFile.len > 0: if options.outFile.len > 0:
exefile = options.outFile.expandTilde exefile = options.outFile.expandTilde
if not exefile.isAbsolute():
exefile = getCurrentDir() / exefile
if not noAbsolutePaths(): if not noAbsolutePaths():
if not exefile.isAbsolute(): if not exefile.isAbsolute():
exefile = joinPath(splitFile(projectfile).dir, exefile) exefile = joinPath(splitFile(projectfile).dir, exefile)

View file

@ -2,6 +2,16 @@
News News
==== ====
2016-XX-XX Version 0.13.1 released
==================================
Changes affecting backwards compatibility
-----------------------------------------
- ``--out`` and ``--nimcache`` command line arguments are now relative to
current directory. Previously they were relative to project directory.
2016-01-27 Nim in Action is now available! 2016-01-27 Nim in Action is now available!
========================================== ==========================================