[gnome-builder] foundry: don't treat missing envvar as empty string



commit adb9d8432472fd59121e27d4f55c7ff83c7ec3d9
Author: Christian Hergert <chergert redhat com>
Date:   Fri Apr 19 12:39:58 2019 -0700

    foundry: don't treat missing envvar as empty string

 src/libide/foundry/ide-build-system.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/src/libide/foundry/ide-build-system.c b/src/libide/foundry/ide-build-system.c
index a1339797b..d65345da2 100644
--- a/src/libide/foundry/ide-build-system.c
+++ b/src/libide/foundry/ide-build-system.c
@@ -151,7 +151,13 @@ ide_build_system_real_get_build_flags_async (IdeBuildSystem      *self,
     }
 
   if (flags == NULL)
-    flags = "";
+    {
+      ide_task_return_new_error (task,
+                                 G_IO_ERROR,
+                                 G_IO_ERROR_NOT_SUPPORTED,
+                                 "No CFLAGS or CXXFLAGS environment variables were specified");
+      return;
+    }
 
   if (!g_shell_parse_argv (flags, NULL, &parsed_flags, &error))
     ide_task_return_error (task, g_steal_pointer (&error));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]