Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/main/java/jenkins/plugins/nodejs/tools/Platform.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
* Supported platform.
*/
public enum Platform {
LINUX("node", "npm", "bin"), WINDOWS("node.exe", "npm.cmd", ""), OSX("node", "npm", "bin"), SUNOS("node", "npm", "bin");
LINUX("node", "npm", "bin"),
WINDOWS("node.exe", "npm.cmd", ""),
OSX("node", "npm", "bin"),
SUNOS("node", "npm", "bin"),
BSD("node", "npm", "bin");

/**
* Choose the file name suitable for the downloaded Node bundle.
Expand Down Expand Up @@ -75,6 +79,9 @@ private static Platform detect(Map<Object, Object> systemProperties) throws Dete
if (arch.contains("sunos")) {
return SUNOS;
}
if (arch.contains("bsd")) {
return BSD;
}
throw new DetectionFailedException("Unknown OS name: " + arch);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ public String resolvePathFor(String version, Platform platform, CPU cpu) {
os = "sunos";
extension = EXTENSION;
break;
case BSD:
os = "bsd";
extension = EXTENSION;
break;
default:
throw new IllegalArgumentException("Unresolvable nodeJS installer for version=" + version + ", platform=" + platform.name());
}
Expand Down Expand Up @@ -107,4 +111,4 @@ public boolean isMSI(String version) {
return false;
}

}
}