Use NodeDir from the nodeSetup only if downloaded.

This commit is contained in:
Volker Berlin 2018-03-24 18:23:34 +01:00
parent e8e066506e
commit b795215b9b

View File

@ -43,9 +43,11 @@ task nodeVersion(type: NodeTask) {
options = ['-v'] options = ['-v']
script = file('scriptDoesNotExists.js') script = file('scriptDoesNotExists.js')
doLast { doLast {
def nodeDir = nodeSetup.getNodeDir() if( node.download ) {
println nodeDir def nodeDir = nodeSetup.getNodeDir() // dir is only valid if downloaded
test.systemProperty 'node.dir', nodeDir println nodeDir
test.systemProperty 'node.dir', nodeDir
}
} }
} }