technomancy / grenchman

Sorry about the name
GNU General Public License v3.0
217 stars 8 forks source link

Set the grench.cwd system property in main task #23

Closed hugoduncan closed 7 years ago

hugoduncan commented 10 years ago

When calling main, sets the grench.cwd system property with the current working directory.

ivan commented 10 years ago

There must be a better way to expose the current directory - I think there's a race condition if two or more grench instances launch and call System/setProperty.

Also, I suspect the %s interpolation in there doesn't work with directories containing double quotes.

I was thinking of passing the entire shell environment (which includes PWD), accessible to the main task via a dynamic var. What do you think?