]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Fix cleaning of output in CodeContext.pkg_config_modversion()
authorRico Tzschichholz <ricotz@ubuntu.com>
Thu, 16 Apr 2020 08:00:21 +0000 (10:00 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Thu, 16 Apr 2020 08:00:21 +0000 (10:00 +0200)
vala/valacodecontext.vala

index 6ddcd8f5c55753cf5f4288bb4e2bbb41fc9a8cf7..6001c901af50c57d51c65600e5f49ea0ff43b15c 100644 (file)
@@ -879,11 +879,13 @@ public class Vala.CodeContext {
 
                try {
                        Process.spawn_command_line_sync (pc, out output, null, out exit_status);
-                       if (exit_status != 0) {
+                       if (exit_status == 0) {
                                output = output[0:-1];
                                if (output == "") {
                                        output = null;
                                }
+                       } else {
+                               output = null;
                        }
                } catch (SpawnError e) {
                        output = null;