From 73c27ca64961de5426b3e9f470ff8569fc2d5dd0 Mon Sep 17 00:00:00 2001 From: Nepomuk Seiler Date: Thu, 28 Feb 2019 15:13:00 +0100 Subject: [PATCH] FIX #1205 Error "Reference to undefined setting: makeBashScripts from dockerAdditi... --- .../sbt/packager/docker/DockerPlugin.scala | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/scala/com/typesafe/sbt/packager/docker/DockerPlugin.scala b/src/main/scala/com/typesafe/sbt/packager/docker/DockerPlugin.scala index 125f37532..96e6fe15b 100644 --- a/src/main/scala/com/typesafe/sbt/packager/docker/DockerPlugin.scala +++ b/src/main/scala/com/typesafe/sbt/packager/docker/DockerPlugin.scala @@ -109,14 +109,14 @@ object DockerPlugin extends AutoPlugin { dockerRmiCommand := dockerExecCommand.value ++ Seq("rmi"), dockerBuildCommand := dockerExecCommand.value ++ Seq("build") ++ dockerBuildOptions.value ++ Seq("."), dockerAdditionalPermissions := { - val scripts = makeBashScripts.value - val ms = (mappings in Docker).value - scripts flatMap { - case (script, _) => - ms collect { - case (k, v) if k == script => DockerChmodType.UserGroupPlusExecute -> v - } - } + (mappings in Docker).value + .collect { + // by default we assume everything in the bin/ folder should be executable + case (_, path) if path.startsWith("bin/") => DockerChmodType.UserGroupPlusExecute -> path + // sh and windows bat files should also be marked as executable + case (_, path) if path.endsWith(".sh") => DockerChmodType.UserGroupPlusExecute -> path + case (_, path) if path.startsWith(".bat") => DockerChmodType.UserGroupPlusExecute -> path + } }, dockerCommands := { val strategy = dockerPermissionStrategy.value