gio/tests: Find "true" in PATH opposed to hardcoding the location
authorMike Ruprecht <mike.ruprecht@collabora.co.uk>
Thu, 25 Apr 2013 07:24:53 +0000 (02:24 -0500)
committerMike Ruprecht <mike.ruprecht@collabora.co.uk>
Thu, 25 Apr 2013 07:54:14 +0000 (02:54 -0500)
Not all systems have /usr/bin/true. Some have it in /bin/true.
Instead of trying to guess a hardcoded path to find it, let
g_app_info_create_from_commandline() internally search PATH
to find the program.

https://bugzilla.gnome.org/show_bug.cgi?id=698655

gio/tests/desktop-app-info.c

index 05dda7c..bcda49f 100644 (file)
@@ -34,7 +34,7 @@ create_app_info (const char *name)
   GAppInfo *info;
 
   error = NULL;
-  info = g_app_info_create_from_commandline ("/usr/bin/true blah",
+  info = g_app_info_create_from_commandline ("true blah",
                                              name,
                                              G_APP_INFO_CREATE_NONE,
                                              &error);