Skip to content

Commit

Permalink
set jna.nosys to true programmatically
Browse files Browse the repository at this point in the history
  • Loading branch information
eed3si9n committed Dec 21, 2017
1 parent d8609ce commit db3c4e4
Show file tree
Hide file tree
Showing 4 changed files with 149 additions and 146 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ install:
- SET PATH=C:\sbt\sbt\bin;%PATH%
- SET SBT_OPTS=-XX:MaxPermSize=2g -Xmx4g -Dfile.encoding=UTF8
test_script:
- sbt "-Djna.nosys=true" "scripted actions/*"
- sbt "scripted actions/*"
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ def otherRootSettings =
scriptedUnpublished := scriptedUnpublishedTask.evaluated,
scriptedSource := (sourceDirectory in sbtProj).value / "sbt-test",
// scriptedPrescripted := { addSbtAlternateResolver _ },
scriptedLaunchOpts := List("-Xmx1500M", "-Xms512M", "-server", "-Djna.nosys=true"),
scriptedLaunchOpts := List("-Xmx1500M", "-Xms512M", "-server"),
publishAll := { val _ = (publishLocal).all(ScopeFilter(inAnyProject)).value },
publishLocalBinAll := { val _ = (publishLocalBin).all(ScopeFilter(inAnyProject)).value },
aggregate in bintrayRelease := false
Expand Down
3 changes: 3 additions & 0 deletions main/src/main/scala/sbt/Main.scala
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ object StandardMain {
def initialState(configuration: xsbti.AppConfiguration,
initialDefinitions: Seq[Command],
preCommands: Seq[String]): State = {
// This is to workaround https://github.com/sbt/io/issues/110
sys.props.put("jna.nosys", "true")

import BasicCommandStrings.isEarlyCommand
val userCommands = configuration.arguments.map(_.trim)
val (earlyCommands, normalCommands) = (preCommands ++ userCommands).partition(isEarlyCommand)
Expand Down
Loading

0 comments on commit db3c4e4

Please sign in to comment.