Merge branch 'fix-desktop-ui-kitten-path-fallback' of https://github.com/devangpratap/kitty

This commit is contained in:
Kovid Goyal 2026-10-31 08:40:55 +05:30
commit f2f7927ec5
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -434,9 +434,11 @@ Interfaces=%s;
dbus_service_defn := filepath.Join(dbus_service_dir, PORTAL_BUS_NAME+".service")
exe_path, eerr := os.Executable()
if eerr != nil {
exe_path = utils.Which("kitten")
if exe_path = utils.Which("kitten"); exe_path == "" {
return fmt.Errorf("failed to get path to kitten executable with error: %w", eerr)
}
}
if exe_path, err = filepath.Abs(exe_path); eerr != nil {
if exe_path, err = filepath.Abs(exe_path); err != nil {
return fmt.Errorf("failed to get path to kitten executable with error: %w", err)
}
if err = os.WriteFile(dbus_service_defn, utils.UnsafeStringToBytes(fmt.Sprintf(