diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2016-10-21 11:33:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-21 11:33:01 +0200 |
commit | df6aeb573afcfd38feab1ab61e66eb8c99e85696 (patch) | |
tree | e8ceafd92ea7fd5574295e178422fcafaf46fdd2 /lib/pure/osproc.nim | |
parent | 50dc712d5e34effe22cb002205a8d7f9a8f082eb (diff) | |
parent | 0c69891b8d7628d0a8b12135447f4aef63224e10 (diff) | |
download | Nim-df6aeb573afcfd38feab1ab61e66eb8c99e85696.tar.gz |
Merge pull request #4918 from cheatfate/macosprocworkdir
One more attempt to fix #4867
Diffstat (limited to 'lib/pure/osproc.nim')
-rw-r--r-- | lib/pure/osproc.nim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim index 6c2debb1b..44ec5b548 100644 --- a/lib/pure/osproc.nim +++ b/lib/pure/osproc.nim @@ -774,7 +774,10 @@ elif not defined(useNimRtl): data.workingDir = workingDir when useProcessAuxSpawn: + var currentDir = getCurrentDir() pid = startProcessAuxSpawn(data) + if workingDir.len > 0: + setCurrentDir(currentDir) else: pid = startProcessAuxFork(data) @@ -835,7 +838,6 @@ elif not defined(useNimRtl): chck posix_spawn_file_actions_adddup2(fops, data.pStderr[writeIdx], 2) var res: cint - # FIXME: chdir is global to process if data.workingDir.len > 0: setCurrentDir($data.workingDir) var pid: Pid |