Closed RayJW closed 2 months ago
For the majority of the installer's work, it requires root. It was designed to operate on system-installed packages. For user-installed Flatpak, it de-escalates automatically: https://github.com/Vencord/Installer/blob/9f8a013bfccbf6cf80d4b1e7fa4274490e31df7f/patcher.go#L153-L160 You don't need to give it sudo to run the installer on a user-installed Flatpak, just don't use the install script and run the binary directly. We aren't going to update the script though because the majority of users are installing to system-installed Discord and doing so would cause more issues than it's worth handling.
the installer rewrite will run as normal user and use pk_exec to elevate.
Currently, the installer (at least on Linux) always escalates privileges. It feels very uncomfortable giving something just downloaded from a domain with curl sudo if there is no clear need. For example, I don't think it's necessary to use sudo when installing Vencord on the Discord user installed Flatpak, since all those folders and files belong to the user.