Nova1545 / gnome-shell-extension-customreboot

A gnome-shell extension to add a "Custom Restart..." option to the shell system panel that allows you to choose what OS you want to boot into, after which it triggers the typical end session dialog for restart.
GNU General Public License v3.0
10 stars 5 forks source link

catch failure on egibootmgr IsUsable check. #7

Closed finchett closed 1 year ago

finchett commented 1 year ago

This has been broken on systemd for a little while. Fixes an exception being thrown from egibootmgr.IsUseable() when efibootmgr is not installed.

Not logging the error message here since this is expected.

stack trace:

(gnome-shell:94114): Gjs-WARNING **: 17:10:09.386: Unhandled promise rejection. To suppress this warning, add an error handler to your promise chain with .catch() or a try-catch block around your await expression. Stack trace of the failed promise:
  createBootMenu@/home/sam/.local/share/gnome-shell/extensions/customreboot@nova1545/extension.js:53:25
  _init@/home/sam/.local/share/gnome-shell/extensions/customreboot@nova1545/extension.js:44:14
  QuickSettingsItem@resource:///org/gnome/shell/ui/quickSettings.js:23:4
  QuickMenuToggle@resource:///org/gnome/shell/ui/quickSettings.js:155:4
  RebootQuickMenu@/home/sam/.local/share/gnome-shell/extensions/customreboot@nova1545/extension.js:21:1
  enable@/home/sam/.local/share/gnome-shell/extensions/customreboot@nova1545/extension.js:158:38
  _callExtensionEnable@resource:///org/gnome/shell/ui/extensionSystem.js:196:38
  loadExtension@resource:///org/gnome/shell/ui/extensionSystem.js:398:32
  async*_loadExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:677:24
  async*_enableAllExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:683:48
  _sessionUpdated@resource:///org/gnome/shell/ui/extensionSystem.js:718:20
  async*init@resource:///org/gnome/shell/ui/extensionSystem.js:59:14
  _initializeUI@resource:///org/gnome/shell/ui/main.js:311:22
  start@resource:///org/gnome/shell/ui/main.js:186:5
  @resource:///org/gnome/shell/ui/init.js:6:17
finchett commented 1 year ago

Actually this still needs work. I'll look into this more.