startProcess changes working directory #4867

Closed
flyx opened this Issue Oct 8, 2016 · 2 comments

Projects

None yet

3 participants

@flyx
Contributor
flyx commented Oct 8, 2016
import os, osproc

echo getCurrentDir()
var process = startProcess("/usr/bin/true", "/usr/bin")
echo getCurrentDir()
discard process.waitForExit()
process.close()

Output:

/Users/flyx/Projects/NimYAML                                                                                                                                                                                
/usr/bin

The workingDir parameter of startProcess apparently does not only change the working directory of the started process, but also of the application itself.

@cheatfate
Contributor

@flyx just to be sure what OS and what flags you have used when compiling?

@cheatfate cheatfate added a commit to cheatfate/Nim that referenced this issue Oct 21, 2016
@cheatfate cheatfate Fix #4867.
Add test for #4867
6e42b41
@cheatfate cheatfate referenced this issue Oct 21, 2016
Closed

Fix #4867. #4916

@flyx
Contributor
flyx commented Oct 21, 2016

@cheatfate I am on OSX, mostly on current devel, where I found this problem. I did not use any flags.

@Araq Araq pushed a commit that closed this issue Oct 21, 2016
@cheatfate cheatfate One more attempt to fix #4867 0c69891
@Araq Araq closed this in 0c69891 Oct 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment