Skip to content

Commit eecbb38

Browse files
authored
Merge pull request #211 from bluesliverx/main
Fix issues with no-cache flag and new builder
2 parents 73361d9 + 7d26ed1 commit eecbb38

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

buildrunner/docker/multiplatform_image_builder.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def _build_single_image(
288288
target: str,
289289
build_args: dict,
290290
inject: dict,
291-
cache: bool = False,
291+
cache: Optional[bool] = None,
292292
pull: bool = False,
293293
secrets: Optional[List[str]] = None,
294294
) -> None:
@@ -323,7 +323,8 @@ def _build_single_image(
323323
build_kwargs = {}
324324
if builder:
325325
build_kwargs["builder"] = builder
326-
if cache:
326+
# Handle both no cache and cache
327+
if cache is not None:
327328
build_kwargs["cache"] = cache
328329
if pull:
329330
build_kwargs["pull"] = pull
@@ -406,7 +407,7 @@ def build_multiple_images(
406407
use_threading: bool = True,
407408
build_args: dict = None,
408409
inject: dict = None,
409-
cache: bool = False,
410+
cache: Optional[bool] = None,
410411
pull: bool = False,
411412
secrets: Optional[List[str]] = None,
412413
) -> BuiltImageInfo:

0 commit comments

Comments
 (0)