Affects Version/s: 0.9-rc-3
Fix Version/s: 1.0-milestone-2
When I try to use the --daemon feature in the 0.9-rc3 release, the gradle daemon process seems to end up with the wrong working directory. For example, suppose I have my gradle based project checked out here :
I have a bash shell open in that directory, and I run :
gradle --daemon clean
The daemon process starts, but the process has the wrong working directory (it sees the current directory as /home/lhankins/.gradle instead of /work/project1). I have verified this by using VisualVM to attach to the gradle process and inspect the system properties (the user.dir propoerty has a value of /home/lhankins/.gradle instead of the expected /work/project1).
The reason I noticed this is because our build.gradle file tries to load a property file which is located relative to the project directory (./metadata/default.properties). When I run with --daemon, I get a FileNotFoundException when it tries to load this file.
If I skip the --daemon flag, things run fine (we've been using gradle 0.9-rc1 for months).
One other piece of information, if I add the --foreground argument along with --daemon, then things work just fine (inspecting VisualVM, user.dir system property is correctly set to /work/project1).