We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 28c3e0a commit f6de97dCopy full SHA for f6de97d
src/main/scala/ai/kien/python/Python.scala
@@ -46,13 +46,15 @@ class Python private[python] (
46
)
47
}
48
49
- lazy val ldflags = for {
+ lazy val ldflags: Try[Seq[String]] = for {
50
rawLdflags <- rawLdflags
51
nativeLibraryPaths <- nativeLibraryPaths
52
libPathFlags = nativeLibraryPaths.map("-L" + _)
53
flags = rawLdflags
54
- .split("\\s+")
+ .split("\\s+(?=-)")
55
.filter(f => f.nonEmpty && !libPathFlags.contains(f))
56
+ .flatMap(f => if (f.startsWith("-L")) Array(f) else f.split("\\s+"))
57
+ .toSeq
58
} yield libPathFlags ++ flags
59
60
private val path: String = getEnv("PATH").getOrElse("")
0 commit comments