Slackbot
04/22/2023, 8:51 PMVampire
04/22/2023, 10:27 PMVampire
04/22/2023, 10:27 PMVampire
04/22/2023, 10:28 PMVampire
04/22/2023, 10:29 PMVampire
04/22/2023, 10:30 PMtasks.create, but tasks.register is much better of course. 😄Vampire
04/22/2023, 10:30 PMval createCommitHook by tasks.registering(Copy::class) { ... } if you preferVampire
04/22/2023, 10:32 PMrootProject.rootDir does make little sense.
rootDir is the projectDir of the rootProject. So you get the project dir from the root project of the root project. 🙂
Either just use rootDir, or actually use rootProject.file(".git/hooks") instead of File(...)Colton Idle
04/22/2023, 11:06 PMfileMode = 0x755 would also be incorrect? Because that seems to work?Vampire
04/22/2023, 11:09 PMVampire
04/22/2023, 11:12 PMfileMode = "0755".toInt(8)Colton Idle
04/22/2023, 11:12 PMColton Idle
04/22/2023, 11:12 PMVampire
04/22/2023, 11:14 PM(8), the leading 0 is just noise. 🙂ephemient
04/23/2023, 2:34 AMephemient
04/23/2023, 2:36 AMfilePermissions = PosixFilePermissions.fromString("rwxr-xr-x")
(and maybe even a setFilePermissions("rwxr-xr-x") shortcut) but clearly that hasn't happenedephemient
04/23/2023, 2:43 AMephemient
04/23/2023, 7:39 AMephemient
04/23/2023, 7:40 AMfileMode = PermissionUtils.modeFromPermissions(PosixFilePermissions.fromString("rwxr-xr-x"), PermissionUtils.FileType.REGULAR_FILE)
is a lot more verbose but with some shortcuts it could be clearer than octal