[GRADLE-1652] Environment not working Created: 01/Jul/11 Updated: 04/Jan/13 Resolved: 09/Nov/11 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | 1.0-milestone-3 |
Fix Version/s: | None |
Type: | Bug | ||
Reporter: | Donald Kwakkel | Assignee: | Unassigned |
Resolution: | Not A Bug | Votes: | 0 |
Description |
I tried setting environment for an exec task, but it seems not to work: task test { } Output: Expected: gradle --version ------------------------------------------------------------ Gradle build time: Monday, 25 April 2011 5:40:11 PM EST Kind Regards, Donald |
Comments |
Comment by Adam Murdoch [ 03/Jul/11 ] |
The exec action does not execute a shell, so environment variable substitution is not going to work. You'll need to do something like this, instead: exec { commandLine 'bash', '-c', 'echo', '$TEST' environment ... } |