mirror of
https://github.com/flatpak/flatpak.git
synced 2026-05-11 17:36:44 -04:00
Improve error message for sudo flatpak run
Closes: https://github.com/flatpak/flatpak/issues/3963
This commit is contained in:
committed by
Simon McVittie
parent
c8cbf26316
commit
1fa898202a
@@ -3772,7 +3772,7 @@ check_sudo (GError **error)
|
||||
/* SUDO_COMMAND could be a value like `/usr/bin/flatpak run foo` */
|
||||
split_command = g_strsplit (sudo_command_env, " ", 2);
|
||||
if (g_str_has_suffix (split_command[0], "flatpak"))
|
||||
return flatpak_fail_error (error, FLATPAK_ERROR, _("\"flatpak run\" is not intended to be ran with sudo"));
|
||||
return flatpak_fail_error (error, FLATPAK_ERROR, _("\"flatpak run\" is not intended to be ran with `sudo`, use `sudo -i` or `su -l` instead"));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user