Skip to content

Commit 4876ea0

Browse files
committed
Merge pull request #78 from ysb33r/master
Fixes #77 - Fixed issue with gemWorkDir not specified
2 parents 6a097e9 + 8470697 commit 4876ea0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ apply from: 'gradle/integration-tests.gradle'
1414

1515

1616
group = 'com.github.jruby-gradle'
17-
version = '0.1.6'
17+
version = '0.1.7'
1818
archivesBaseName = 'jruby-gradle-plugin'
1919

2020
if (System.env.RELEASE != '1') {

src/main/groovy/com/github/jrubygradle/JRubyExec.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class JRubyExec extends JavaExec {
6363
* @since 0.1.6
6464
*/
6565
@OutputDirectory
66-
File gemWorkDir
66+
File gemWorkDir = null
6767

6868
JRubyExec() {
6969
super()
@@ -149,7 +149,7 @@ class JRubyExec extends JavaExec {
149149
*
150150
*/
151151
String getComputedPATH(String originalPath) {
152-
File path = new File(tmpGemDir(), 'bin')
152+
File path = new File(gemWorkDir ?: tmpGemDir(), 'bin')
153153
return path.absolutePath + File.pathSeparatorChar + originalPath
154154
}
155155

@@ -183,7 +183,7 @@ class JRubyExec extends JavaExec {
183183
gemWorkDir = tmpGemDir()
184184
}
185185
gemWorkDir.mkdirs()
186-
environment 'GEM_HOME' : gemWorkDir,
186+
environment 'GEM_HOME' : gemWorkDir.absolutePath,
187187
'PATH' : getComputedPATH(System.env.PATH)
188188

189189
if (configuration != null) {

0 commit comments

Comments
 (0)