mirror of https://github.com/sbt/sbt.git
Fix #8441: Allow system JNA on OpenBSD by making jna.nosys conditional
This commit is contained in:
parent
997ad9619a
commit
1054ee851e
|
|
@ -61,6 +61,7 @@ private[sbt] object xMain:
|
|||
|
||||
private[sbt] def run(configuration: xsbti.AppConfiguration): xsbti.MainResult = boundary {
|
||||
try {
|
||||
if (!sys.props.contains("jna.nosys")) sys.props.put("jna.nosys", "true")
|
||||
import BasicCommandStrings.{ JavaClient, DashDashClient, DashDashServer, runEarly }
|
||||
import BasicCommands.early
|
||||
import BuiltinCommands.defaults
|
||||
|
|
@ -265,7 +266,7 @@ object StandardMain {
|
|||
preCommands: Seq[String]
|
||||
): State = {
|
||||
// This is to workaround https://github.com/sbt/io/issues/110
|
||||
sys.props.put("jna.nosys", "true")
|
||||
if (!sys.props.contains("jna.nosys")) sys.props.put("jna.nosys", "true")
|
||||
|
||||
import BasicCommandStrings.{ DashDashDetachStdio, DashDashServer, isEarlyCommand }
|
||||
val userCommands =
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ trait ScriptedKeys {
|
|||
|
||||
object Scripted {
|
||||
// This is to workaround https://github.com/sbt/io/issues/110
|
||||
sys.props.put("jna.nosys", "true")
|
||||
if (!sys.props.contains("jna.nosys")) sys.props.put("jna.nosys", "true")
|
||||
|
||||
val RepoOverrideTest = config("repoOverrideTest") extend Compile
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ object RunFromSourceMain {
|
|||
s"Must specify working directory, scala version and sbt version and classpath as the first three arguments"
|
||||
)
|
||||
case Array(wd, scalaVersion, sbtVersion, classpath, args*) =>
|
||||
System.setProperty("jna.nosys", "true")
|
||||
if (System.getProperty("jna.nosys") == null) System.setProperty("jna.nosys", "true")
|
||||
if (args.exists(_.startsWith("<"))) System.setProperty("sbt.io.virtual", "false")
|
||||
val context = LoggerContext()
|
||||
try run(file(wd), scalaVersion, sbtVersion, classpath, args, context)
|
||||
|
|
|
|||
Loading…
Reference in New Issue