fix(lambda): store hot-reload host paths with POSIX separators (#4080)

Build the stored and mounted hot-reload path from its segments joined with a forward slash, so a JVM whose default separator is a backslash does not hand Docker a path it cannot use.
This commit is contained in:
Priamo Germosen authored and GitHub committed 2026-09-21 21:54:29 -05:00
1 parent 15247f0ff5
commit 73316c52e7
2 files changed
+17 -1

No files matched your search

@@ -991,6 +991,13 @@ class LambdaServiceTest {
assertEquals("InvalidParameterValueException", ex.getErrorCode());
}
@Test
void hotReload_dockerHostPathIsAlwaysPosixSeparated() {
assertEquals("/home/ci/code/lib", LambdaService.toDockerHostPath(Path.of("/home/ci/code/lib")));
assertEquals("/home", LambdaService.toDockerHostPath(Path.of("/home")));
assertEquals("/", LambdaService.toDockerHostPath(Path.of("/")));
}
@Test
void hotReload_allowListAcceptsThePrefixItselfAndItsChildren() {
LambdaService svc = serviceWithHotReload(true, List.of("/home/ci/code"));