diff options
author | Lukas Rytz <lukas.rytz@typesafe.com> | 2016-01-26 06:54:26 +0100 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@typesafe.com> | 2016-01-26 06:54:26 +0100 |
commit | 47b89108cf0f33c70c9958ffd182762243afdbbf (patch) | |
tree | 6f09761820b044d7c38d88f80e73ba6e903e3092 /build.sbt | |
parent | 7604ccbf12f52a4091a98ba74040cf11e476053e (diff) | |
parent | 05ec8ac76dbed2c8a9781c9a4366fc01fc4e3aa3 (diff) | |
download | scala-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.sbt | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 } |