mirror of
https://github.com/flatpak/flatpak.git
synced 2026-10-21 23:25:33 -04:00
Use the installed/not-installed errors more consequently
This commit is contained in:
1 parent
2ef6d9d5d9
commit
712fc9fc08
3 files changed
+8
-7
No files matched your search
@@ -32,6 +32,7 @@
|
||||
|
||||
#include "flatpak-builtins.h"
|
||||
#include "flatpak-utils.h"
|
||||
#include "lib/flatpak-error.h"
|
||||
#include "flatpak-chain-input-stream.h"
|
||||
|
||||
static char *opt_arch;
|
||||
@@ -237,7 +238,7 @@ flatpak_builtin_install (int argc, char **argv, GCancellable *cancellable, GErro
|
||||
return flatpak_fail (error, "%s %s, branch %s is already installed",
|
||||
is_app ? "App" : "Runtime", name, branch ? branch : "master");
|
||||
|
||||
if (!g_error_matches (my_error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
|
||||
if (!g_error_matches (my_error, FLATPAK_ERROR, FLATPAK_ERROR_NOT_INSTALLED))
|
||||
{
|
||||
g_propagate_error (error, g_steal_pointer (&my_error));
|
||||
return FALSE;
|
||||
|
||||
@@ -720,7 +720,7 @@ flatpak_dir_get_deploy_data (FlatpakDir *self,
|
||||
deploy_dir = flatpak_dir_get_if_deployed (self, ref, NULL, cancellable);
|
||||
if (deploy_dir == NULL)
|
||||
{
|
||||
flatpak_fail (error, "%s is not installed", ref);
|
||||
g_set_error (error, FLATPAK_ERROR, FLATPAK_ERROR_NOT_INSTALLED, "%s not installed", ref);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -755,7 +755,7 @@ flatpak_dir_get_origin (FlatpakDir *self,
|
||||
cancellable, error);
|
||||
if (deploy_data == NULL)
|
||||
{
|
||||
flatpak_fail (error, "%s is not installed", ref);
|
||||
g_set_error (error, FLATPAK_ERROR, FLATPAK_ERROR_NOT_INSTALLED, "%s not installed", ref);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -776,7 +776,7 @@ flatpak_dir_get_subpaths (FlatpakDir *self,
|
||||
cancellable, error);
|
||||
if (deploy_data == NULL)
|
||||
{
|
||||
flatpak_fail (error, "%s is not installed", ref);
|
||||
g_set_error (error, FLATPAK_ERROR, FLATPAK_ERROR_NOT_INSTALLED, "%s not installed", ref);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -3698,7 +3698,7 @@ flatpak_dir_find_installed_ref (FlatpakDir *self,
|
||||
}
|
||||
}
|
||||
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
|
||||
g_set_error (error, FLATPAK_ERROR, FLATPAK_ERROR_NOT_INSTALLED,
|
||||
"%s %s not installed", name, opt_branch ? opt_branch : "master");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -390,7 +390,7 @@ flatpak_installation_get_installed_ref (FlatpakInstallation *self,
|
||||
ref, NULL, cancellable);
|
||||
if (deploy == NULL)
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
|
||||
g_set_error (error, FLATPAK_ERROR, FLATPAK_ERROR_NOT_INSTALLED,
|
||||
"Ref %s no installed", ref);
|
||||
return NULL;
|
||||
}
|
||||
@@ -429,7 +429,7 @@ flatpak_installation_get_current_installed_app (FlatpakInstallation *self,
|
||||
|
||||
if (deploy == NULL)
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
|
||||
g_set_error (error, FLATPAK_ERROR, FLATPAK_ERROR_NOT_INSTALLED,
|
||||
"App %s no installed", name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user