From 6318eb8480534f9276807901b4b94ed09f4ef05b Mon Sep 17 00:00:00 2001 From: JulesAaelio Date: Fri, 23 Sep 2022 23:09:22 +0200 Subject: [PATCH] Ensure running on non-windows before symlinking pnpm executable --- .../eirslett/maven/plugins/frontend/lib/PNPMInstaller.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/PNPMInstaller.java b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/PNPMInstaller.java index 94ff8e5a..ebf143d9 100644 --- a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/PNPMInstaller.java +++ b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/PNPMInstaller.java @@ -192,9 +192,10 @@ private void copyPnpmScripts() throws InstallationException{ } } } - // If no predefined executables exist, symlink the .cjs executable + // On non-windows platforms, if no predefined executables exist, symlink the .cjs executable File pnpmExecutable = new File(installDirectory, "pnpm"); - if (!pnpmExecutable.exists()) { + if (!pnpmExecutable.exists() && !this.config.getPlatform().isWindows()) { + File pnpmJsExecutable = new File(pnpmDirectory, "bin" + File.separator + "pnpm.cjs"); if (pnpmJsExecutable.exists()) { this.logger.info("No pnpm executable found, creating symlink to {}", pnpmJsExecutable.toPath());