diff options
author | Li Haoyi <haoyi.sg@gmail.com> | 2019-07-08 08:03:34 +0800 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2019-07-08 08:03:34 +0800 |
commit | 903107268580615c9545606b47d9891f30e61b52 (patch) | |
tree | 85fc9b1daae7befe0af23c5ba2c30f31c44e7a86 /build.sc | |
parent | de1e0e4ae3ef0b65075c9896ea25a9b23e2376ee (diff) | |
download | mill-903107268580615c9545606b47d9891f30e61b52.tar.gz mill-903107268580615c9545606b47d9891f30e61b52.tar.bz2 mill-903107268580615c9545606b47d9891f30e61b52.zip |
make use of mill file if it exists and we're not already using it
Diffstat (limited to 'build.sc')
-rwxr-xr-x | build.sc | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -522,11 +522,7 @@ object dev extends MillModule{ if (isWin) { windowsVmOptions("dev.launcher", outputPath, forkArgs()) } else { - val perms = java.nio.file.Files.getPosixFilePermissions(outputPath.toNIO) - perms.add(PosixFilePermission.GROUP_EXECUTE) - perms.add(PosixFilePermission.OWNER_EXECUTE) - perms.add(PosixFilePermission.OTHERS_EXECUTE) - java.nio.file.Files.setPosixFilePermissions(outputPath.toNIO, perms) + os.perms.set(outputPath, "rwxrwxrwx") } PathRef(outputPath) } @@ -608,16 +604,18 @@ def assembly = T{ def millBootstrap = T.sources(os.pwd / "mill") def launcher = T{ + val outputPath = T.ctx().dest / "mill" val millBootstrapGrepPrefix = "DEFAULT_MILL_VERSION=" os.write( - T.ctx().dest / "mill", + outputPath, os.read(millBootstrap().head.path) .replaceAll( millBootstrapGrepPrefix + "[^\\n]+", millBootstrapGrepPrefix + publishVersion()._2 ) ) - PathRef(T.ctx().dest / "mill") + os.perms.set(outputPath, "rwxrwxrwx") + PathRef(outputPath) } val isMasterCommit = { |