From a8b1791d8f0f768f6735a063b059f02fb772bd62 Mon Sep 17 00:00:00 2001 From: kramo Date: Thu, 21 Sep 2023 16:26:05 +0200 Subject: [PATCH] Replace type command with which --- src/importer/sources/desktop_source.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/importer/sources/desktop_source.py b/src/importer/sources/desktop_source.py index 0c547a5..2585d61 100644 --- a/src/importer/sources/desktop_source.py +++ b/src/importer/sources/desktop_source.py @@ -169,9 +169,7 @@ class DesktopSourceIterable(SourceIterable): for command, full_path in commands: # Even if `gio` is available, `gio launch` is only available on GLib >= 2.67.2 check_command = ( - "gio help launch" - if command == "gio launch" - else f"type {command} &> /dev/null" + "gio help launch" if command == "gio launch" else f"which {command}" ) if os.getenv("FLATPAK_ID") == shared.APP_ID: check_command = flatpak_str + shlex.quote(check_command)