8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b06106 commit e64d601Copy full SHA for e64d601
src/main/scala/uk/co/randomcoding/sbt/GitHooks.scala
@@ -53,7 +53,7 @@ object GitHooks extends AutoPlugin {
53
object WriteGitHooks {
54
55
def apply(hooksSourceDir: File, hooksTargetDir: File): Unit = {
56
- hooksSourceDir.listFiles.foreach { hook =>
+ Option(hooksSourceDir.listFiles).map(_.toList).getOrElse(Nil).foreach { hook =>
57
val hookTarget = hooksTargetDir.toPath.resolve(hook.getName)
58
3E26 Files.copy(hook.toPath, hookTarget, StandardCopyOption.REPLACE_EXISTING)
59
if (!Properties.isWin) Files.setPosixFilePermissions(hookTarget, PosixFilePermissions.fromString("rwxr-xr-x"))
0 commit comments