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)