We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 622ac16 commit 2750625Copy full SHA for 2750625
frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/NodeInstaller.java
@@ -201,7 +201,18 @@ private void installNodeDefault() throws InstallationException {
201
for (String script : Arrays.asList("npm", "npm.cmd")) {
202
File scriptFile = new File(npmDirectory, "bin" + File.separator + script);
203
if (scriptFile.exists()) {
204
- scriptFile.setExecutable(true);
+ File copy = new File(destinationDirectory, script);
205
+ if (!copy.exists()) {
206
+ try
207
+ {
208
+ FileUtils.copyFile(scriptFile, copy);
209
+ }
210
+ catch (IOException e)
211
212
+ throw new InstallationException("Could not copy npm", e);
213
214
+ copy.setExecutable(true);
215
216
}
217
218
0 commit comments