[vala/0.48] vala: Fix cleaning of output in CodeContext.pkg_config_modversion()
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.48] vala: Fix cleaning of output in CodeContext.pkg_config_modversion()
- Date: Mon, 20 Apr 2020 17:42:34 +0000 (UTC)
commit f8f245778d2a23d1d80ff277755c387ce7921351
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Thu Apr 16 10:00:21 2020 +0200
vala: Fix cleaning of output in CodeContext.pkg_config_modversion()
vala/valacodecontext.vala | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/vala/valacodecontext.vala b/vala/valacodecontext.vala
index 9f21b9139..fa6c27d94 100644
--- a/vala/valacodecontext.vala
+++ b/vala/valacodecontext.vala
@@ -849,11 +849,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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]