Skip to content

Commit 5a392ad

Browse files
author
Finn Petersen
committed
Relativize symlink to npmScriptFile
This way the downloaded node install can also be used where the filesystem mapping is different, eg. in a docker container.
1 parent ae1c640 commit 5a392ad

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/groovy/com/moowork/gradle/node/task/SetupTask.groovy

+3-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ class SetupTask
135135
Path npm = Paths.get( variant.nodeBinDir.path, 'npm' )
136136
if ( Files.deleteIfExists( npm ) )
137137
{
138-
Files.createSymbolicLink( npm, Paths.get( variant.npmScriptFile ) )
138+
Files.createSymbolicLink(
139+
npm,
140+
variant.nodeBinDir.toPath().relativize(Paths.get(variant.npmScriptFile)))
139141
}
140142
}
141143
}

0 commit comments

Comments
 (0)