[vala/0.46] 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.46] vala: Fix cleaning of output in CodeContext.pkg_config_modversion()
- Date: Tue, 21 Apr 2020 07:49:30 +0000 (UTC)
commit a7824e07f9391df8ff6a2765d526eb82b204bf7a
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 f63863580..9b510182d 100644
--- a/vala/valacodecontext.vala
+++ b/vala/valacodecontext.vala
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]