Skip to content

Commit

Permalink
Ensure running on non-windows before symlinking pnpm executable
Browse files Browse the repository at this point in the history
  • Loading branch information
JulesAaelio committed Sep 23, 2022
1 parent 9915cf9 commit 6318eb8
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 6318eb8

Please sign in to comment.