diff options
author | Ray Strode <rstrode@redhat.com> | 2022-10-18 14:13:58 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2022-10-18 16:02:02 -0400 |
commit | 9d0d30c9d232df4c8c08984934fa6b76efb1922c (patch) | |
tree | 460d2a4f4cc53051f953b03e0f38503be94a1249 | |
parent | 11ca3da0915747f517d32cd4afa32982bccd2b22 (diff) | |
download | glib-9d0d30c9d232df4c8c08984934fa6b76efb1922c.tar.gz |
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.
-rw-r--r-- | gio/tests/file.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gio/tests/file.c b/gio/tests/file.c index 36dccac66..ccac590a4 100644 --- a/gio/tests/file.c +++ b/gio/tests/file.c @@ -2472,10 +2472,14 @@ get_size_from_du (const gchar *path, guint64 *size) GError *error = 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"); +#endif + + /* If we can’t find du, don’t try and run the test. */ if (du_path == NULL) return FALSE; + g_free (du_path); du = g_subprocess_new (G_SUBPROCESS_FLAGS_STDOUT_PIPE, |