Fix Pod.build to unshare prior to building async
This commit is contained in:
parent
ecabf6c9ce
commit
c5af902382
@ -1,9 +1,11 @@
|
|||||||
import cli2
|
import cli2
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
from shlax.targets.base import Target
|
from shlax.targets.base import Target
|
||||||
from shlax.actions.parallel import Parallel
|
from shlax.actions.parallel import Parallel
|
||||||
|
from shlax.proc import Proc
|
||||||
|
|
||||||
from .podman import Podman
|
from .podman import Podman
|
||||||
|
|
||||||
@ -27,7 +29,7 @@ class Pod:
|
|||||||
|
|
||||||
async def build(self, target, *names):
|
async def build(self, target, *names):
|
||||||
"""Build container images"""
|
"""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)
|
os.execvp('buildah', ['buildah', 'unshare'] + sys.argv)
|
||||||
else:
|
else:
|
||||||
await self._call(target, 'build', *names)
|
await self._call(target, 'build', *names)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user