diff --git a/src/portable/portablectl.c b/src/portable/portablectl.c index c6eed7ae0f..1c479f1134 100644 --- a/src/portable/portablectl.c +++ b/src/portable/portablectl.c @@ -556,7 +556,7 @@ static int verb_inspect_image(int argc, char *argv[], uintptr_t _data, void *use strna(pretty_os)); } - if (!strv_isempty(arg_extension_images)) { + if (!strv_isempty(arg_extension_images) || arg_force) { /* If we specified any extensions, we'll first get back exactly the paths (and * extension-release content) for each one of the arguments. */ diff --git a/test/units/TEST-29-PORTABLE.image.sh b/test/units/TEST-29-PORTABLE.image.sh index 3018e86ecd..ba711e93b3 100755 --- a/test/units/TEST-29-PORTABLE.image.sh +++ b/test/units/TEST-29-PORTABLE.image.sh @@ -66,6 +66,7 @@ portablectl "${ARGS[@]}" attach --force --now --runtime /usr/share/minimal_0.raw portablectl is-attached --force minimal-app0 portablectl inspect --force /usr/share/minimal_0.raw minimal-app0.service +portablectl inspect --force /usr/share/minimal_0.raw minimal-app0.service | grep -F "minimal-app0.service" >/dev/null systemctl is-active minimal-app0.service systemctl is-active minimal-app0-foo.service systemctl is-active minimal-app0-bar.service && exit 1