From 4317cf9cd4bb5d65671f1c4f6b0f117b200d0700 Mon Sep 17 00:00:00 2001 From: jpic Date: Thu, 11 Jun 2020 17:44:02 +0200 Subject: [PATCH] Do not try to commit a container that has not been created because layers are uptodate --- shlax/targets/buildah.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shlax/targets/buildah.py b/shlax/targets/buildah.py index 0073d3c..eaf1418 100644 --- a/shlax/targets/buildah.py +++ b/shlax/targets/buildah.py @@ -145,7 +145,7 @@ class Buildah(Target): await self.parent.exec('umount', self.root / str(dst)[1:]) await self.parent.exec('buildah', 'umount', self.ctr) - if result.status == 'success': + if result.status == 'success' and self.ctr: await self.commit() if os.getenv('BUILDAH_PUSH'): await self.image.push(target)