Skip to content

Commit f7d02ac

Browse files
authored
Normalize paths when mapping generic files to docker (#1343)
1 parent e646348 commit f7d02ac

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/main/scala/com/typesafe/sbt/packager/docker/DockerPlugin.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,8 @@ object DockerPlugin extends AutoPlugin {
550550
def renameDests(from: Seq[(File, String)], dest: String) =
551551
for {
552552
(f, path) <- from
553-
newPath = "%s/%s" format (dest, path)
553+
pathWithValidSeparator = if (Path.sep == '/') path else path.replace(Path.sep, '/')
554+
newPath = "%s/%s" format (dest, pathWithValidSeparator)
554555
} yield (f, newPath)
555556

556557
inConfig(Docker)(Seq(mappings := renameDests((mappings in Universal).value, defaultLinuxInstallLocation.value)))

0 commit comments

Comments
 (0)