cmd_image_inspect(): add --shell/-s
This commit is contained in:
parent
9ece4f582e
commit
525c012d9c
1 changed files with 8 additions and 2 deletions
10
image.py
10
image.py
|
@ -195,7 +195,8 @@ def cmd_build():
|
|||
|
||||
|
||||
@cmd_image.command(name='inspect')
|
||||
def cmd_inspect():
|
||||
@click.option('--shell', '-s', is_flag=True)
|
||||
def cmd_inspect(shell: bool = False):
|
||||
device, flavour = get_device_and_flavour()
|
||||
image_name = get_image_name(device, flavour)
|
||||
|
||||
|
@ -204,4 +205,9 @@ def cmd_inspect():
|
|||
|
||||
logging.info(f'Inspect the rootfs image at {rootfs_mount}')
|
||||
|
||||
pause()
|
||||
if shell:
|
||||
chroot.initialized = True
|
||||
chroot.activate()
|
||||
chroot.run_cmd('/bin/bash')
|
||||
else:
|
||||
pause()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue