summaryrefslogtreecommitdiff
path: root/build.sbt
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@typesafe.com>2016-01-26 06:54:26 +0100
committerLukas Rytz <lukas.rytz@typesafe.com>2016-01-26 06:54:26 +0100
commit47b89108cf0f33c70c9958ffd182762243afdbbf (patch)
tree6f09761820b044d7c38d88f80e73ba6e903e3092 /build.sbt
parent7604ccbf12f52a4091a98ba74040cf11e476053e (diff)
parent05ec8ac76dbed2c8a9781c9a4366fc01fc4e3aa3 (diff)
downloadscala-47b89108cf0f33c70c9958ffd182762243afdbbf.tar.gz
scala-47b89108cf0f33c70c9958ffd182762243afdbbf.tar.bz2
scala-47b89108cf0f33c70c9958ffd182762243afdbbf.zip
Merge pull request #4913 from szeiger/wip/sbt-windows-fixes
Some fixes for the sbt build on Windows
Diffstat (limited to 'build.sbt')
-rw-r--r--build.sbt7
1 files changed, 4 insertions, 3 deletions
diff --git a/build.sbt b/build.sbt
index 6f82d78413..ad9d5c8866 100644
--- a/build.sbt
+++ b/build.sbt
@@ -767,9 +767,10 @@ lazy val mkBinImpl: Def.Initialize[Task[Seq[File]]] = Def.task {
scalaTool.writeScript(file, "windows", rootDir, outDir)
)
res.foreach { f =>
- //TODO 2.12: Use Files.setPosixFilePermissions() (Java 7+) instead of calling out to chmod
- if(Process(List("chmod", "ugo+rx", f.getAbsolutePath())).! > 0)
- throw new IOException("chmod failed")
+ if(!f.getAbsoluteFile.setExecutable(true, /* ownerOnly: */ false))
+ throw new IOException("setExecutable failed")
+ if(!f.getAbsoluteFile.setReadable(true, /* ownerOnly: */ false))
+ throw new IOException("setReadable failed")
}
res
}