mirror of
https://github.com/flatpak/flatpak.git
synced 2026-05-19 06:11:47 -04:00
cli: Make FLATPAK_ERROR_ABORTED return a failed exit code.
We now return a NULL error meaning nothing is printed as before but a FALSE result which means the exist code marks the failure. Closes: #2858 Approved by: alexlarsson
This commit is contained in:
committed by
Atomic Bot
parent
7eb6467e4d
commit
e3db7a4461
@@ -169,10 +169,7 @@ install_bundle (FlatpakDir *dir,
|
||||
if (!flatpak_transaction_run (transaction, cancellable, error))
|
||||
{
|
||||
if (g_error_matches (*error, FLATPAK_ERROR, FLATPAK_ERROR_ABORTED))
|
||||
{
|
||||
g_clear_error (error);
|
||||
return TRUE;
|
||||
}
|
||||
g_clear_error (error); /* Don't report on stderr */
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -246,10 +243,7 @@ install_from (FlatpakDir *dir,
|
||||
if (!flatpak_transaction_run (transaction, cancellable, error))
|
||||
{
|
||||
if (g_error_matches (*error, FLATPAK_ERROR, FLATPAK_ERROR_ABORTED))
|
||||
{
|
||||
g_clear_error (error);
|
||||
return TRUE;
|
||||
}
|
||||
g_clear_error (error); /* Don't report on stderr */
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -521,10 +515,7 @@ flatpak_builtin_install (int argc, char **argv, GCancellable *cancellable, GErro
|
||||
if (!flatpak_transaction_run (transaction, cancellable, error))
|
||||
{
|
||||
if (g_error_matches (*error, FLATPAK_ERROR, FLATPAK_ERROR_ABORTED))
|
||||
{
|
||||
g_clear_error (error);
|
||||
return TRUE;
|
||||
}
|
||||
g_clear_error (error); /* Don't report on stderr */
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -114,10 +114,8 @@ flatpak_builtin_remote_delete (int argc, char **argv, GCancellable *cancellable,
|
||||
if (!flatpak_transaction_run (transaction, cancellable, error))
|
||||
{
|
||||
if (g_error_matches (*error, FLATPAK_ERROR, FLATPAK_ERROR_ABORTED))
|
||||
{
|
||||
g_clear_error (error);
|
||||
return TRUE;
|
||||
}
|
||||
g_clear_error (error); /* Don't report on stderr */
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -373,10 +373,7 @@ flatpak_builtin_uninstall (int argc, char **argv, GCancellable *cancellable, GEr
|
||||
if (!flatpak_transaction_run (transaction, cancellable, error))
|
||||
{
|
||||
if (g_error_matches (*error, FLATPAK_ERROR, FLATPAK_ERROR_ABORTED))
|
||||
{
|
||||
g_clear_error (error);
|
||||
return TRUE;
|
||||
}
|
||||
g_clear_error (error); /* Don't report on stderr */
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -277,10 +277,7 @@ flatpak_builtin_update (int argc,
|
||||
if (!flatpak_transaction_run (transaction, cancellable, error))
|
||||
{
|
||||
if (g_error_matches (*error, FLATPAK_ERROR, FLATPAK_ERROR_ABORTED))
|
||||
{
|
||||
g_clear_error (error);
|
||||
return TRUE;
|
||||
}
|
||||
g_clear_error (error); /* Don't report on stderr */
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user