Do not try to commit a container that has not been created because layers are uptodate

This commit is contained in:
jpic 2020-06-11 17:44:02 +02:00
parent 150736f4f4
commit 4317cf9cd4

View File

@ -145,7 +145,7 @@ class Buildah(Target):
await self.parent.exec('umount', self.root / str(dst)[1:]) await self.parent.exec('umount', self.root / str(dst)[1:])
await self.parent.exec('buildah', 'umount', self.ctr) await self.parent.exec('buildah', 'umount', self.ctr)
if result.status == 'success': if result.status == 'success' and self.ctr:
await self.commit() await self.commit()
if os.getenv('BUILDAH_PUSH'): if os.getenv('BUILDAH_PUSH'):
await self.image.push(target) await self.image.push(target)