mirror of
https://github.com/flatpak/flatpak.git
synced 2026-05-18 13:52:53 -04:00
system-helper: Fix checking if the reinstall flag was passed in
Fixes: 919d2922 ("common: support reinstall option on bundle installations")
This commit is contained in:
@@ -961,7 +961,7 @@ handle_install_bundle (FlatpakSystemHelper *object,
|
||||
return G_DBUS_METHOD_INVOCATION_HANDLED;
|
||||
}
|
||||
|
||||
reinstall = !!(arg_flags & FLATPAK_HELPER_INSTALL_BUNDLE_FLAGS_NO_INTERACTION);
|
||||
reinstall = (arg_flags & FLATPAK_HELPER_INSTALL_BUNDLE_FLAGS_REINSTALL) != 0;
|
||||
if (!flatpak_dir_install_bundle (system, reinstall, bundle_file, arg_remote, &ref, NULL, &error))
|
||||
{
|
||||
flatpak_invocation_return_error (invocation, error, "Error installing bundle");
|
||||
|
||||
@@ -49,7 +49,7 @@ ${FLATPAK} uninstall ${U} -y org.test.Hello >&2
|
||||
${FLATPAK} install ${U} -y --bundle bundles/hello.flatpak >&2
|
||||
|
||||
# Installing again without reinstall option should fail...
|
||||
! ${FLATPAK} install ${U} -y --bundle bundles/hello.flatpak >&2
|
||||
assert_fail ${FLATPAK} install ${U} -y --bundle bundles/hello.flatpak >&2
|
||||
# Now with reinstall option it should pass...
|
||||
${FLATPAK} install ${U} -y --bundle bundles/hello.flatpak --reinstall >&2
|
||||
|
||||
|
||||
Reference in New Issue
Block a user