]> 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>
Mon, 20 Apr 2020 19:37:50 +0000 (21:37 +0200)
vala/valacodecontext.vala

index f63863580c4ec7ba42f9c58f725b88f654fc3421..9b510182daf3cc7e2190a78da19959fddd54c10b 100644 (file)
@@ -826,11 +826,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;