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.
2 parents 12bc2e5 + e9bb0bc commit 663bb60Copy full SHA for 663bb60
Package.swift
@@ -19,6 +19,10 @@ func findJavaHome() -> String {
19
// picking up env variables during the build process
20
let path = "\(FileManager.default.homeDirectoryForCurrentUser.path()).java_home"
21
if let home = try? String(contentsOfFile: path) {
22
+ if let lastChar = home.last, lastChar.isNewline {
23
+ return String(home.dropLast())
24
+ }
25
+
26
return home
27
}
28
0 commit comments