From c5af90238223786a7c3fa47a5325fd69491f1490 Mon Sep 17 00:00:00 2001 From: jpic Date: Fri, 28 Aug 2020 18:42:29 +0200 Subject: [PATCH] Fix Pod.build to unshare prior to building async --- shlax/pod.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shlax/pod.py b/shlax/pod.py index e19c519..d3c823c 100644 --- a/shlax/pod.py +++ b/shlax/pod.py @@ -1,9 +1,11 @@ import cli2 import json import os +import sys from shlax.targets.base import Target from shlax.actions.parallel import Parallel +from shlax.proc import Proc from .podman import Podman @@ -27,7 +29,7 @@ class Pod: async def build(self, target, *names): """Build container images""" - if not Proc.test or os.getuid() == 0: + if not (Proc.test or os.getuid() == 0): os.execvp('buildah', ['buildah', 'unshare'] + sys.argv) else: await self._call(target, 'build', *names)