mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-28 01:56:52 +02:00
tests: Don't run du on osx
The du command that ships on OS X doesn't understand --bytes, so don't try to use du on that platform.
This commit is contained in:
parent
11ca3da091
commit
9d0d30c9d2
@ -2472,10 +2472,14 @@ get_size_from_du (const gchar *path, guint64 *size)
|
|||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
gchar *du_path = NULL;
|
gchar *du_path = NULL;
|
||||||
|
|
||||||
/* If we can’t find du, don’t try and run the test. */
|
#ifndef HAVE_COCOA
|
||||||
du_path = g_find_program_in_path ("du");
|
du_path = g_find_program_in_path ("du");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* If we can’t find du, don’t try and run the test. */
|
||||||
if (du_path == NULL)
|
if (du_path == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
g_free (du_path);
|
g_free (du_path);
|
||||||
|
|
||||||
du = g_subprocess_new (G_SUBPROCESS_FLAGS_STDOUT_PIPE,
|
du = g_subprocess_new (G_SUBPROCESS_FLAGS_STDOUT_PIPE,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user