diff --git a/garden-service/src/plugins/kubernetes/container/build.ts b/garden-service/src/plugins/kubernetes/container/build.ts index a6a745582d..b1696febf7 100644 --- a/garden-service/src/plugins/kubernetes/container/build.ts +++ b/garden-service/src/plugins/kubernetes/container/build.ts @@ -610,13 +610,17 @@ async function runKaniko({ provider, namespace, log, module, args, outputStream }, }) - return runner.startAndWait({ - ignoreError: true, - interactive: false, - log, - timeout: module.spec.build.timeout, - stdout: outputStream, - }) + try { + return runner.startAndWait({ + ignoreError: true, + interactive: false, + log, + timeout: module.spec.build.timeout, + stdout: outputStream, + }) + } finally { + await runner.stop() + } } async function getManifestInspectArgs(module: ContainerModule, deploymentRegistry: ContainerRegistryConfig) {