summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2018-11-15 00:00:00 +0000
committerTomasz Miąsko <tomasz.miasko@gmail.com>2018-12-06 20:08:57 +0100
commitdfa40d895fa5ad44ce34c80ddc5d5eb87080890b (patch)
treee7228db0ecb1c787325ec333807dc52e644ac517 /bin
parent82be1a9403defae17083154a5565ff0191cdffe5 (diff)
downloaddconf-dfa40d895fa5ad44ce34c80ddc5d5eb87080890b.tar.gz
bin: Indicate update failure with non-zero exit code
Fixes issue #42.
Diffstat (limited to 'bin')
-rw-r--r--bin/dconf-update.vala7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/dconf-update.vala b/bin/dconf-update.vala
index b4e0132..9492adb 100644
--- a/bin/dconf-update.vala
+++ b/bin/dconf-update.vala
@@ -235,15 +235,22 @@ void maybe_update_from_directory (string dirname) throws GLib.Error {
}
void update_all (string dirname) throws GLib.Error {
+ var failed = false;
+
foreach (var name in list_directory (dirname, Posix.S_IFDIR)) {
if (name.has_suffix (".d")) {
try {
maybe_update_from_directory (name);
} catch (Error e) {
+ failed = true;
printerr ("unable to compile %s: %s\n", name, e.message);
}
}
}
+
+ if (failed) {
+ Process.exit (2);
+ }
}
void dconf_compile (string[] args) throws GLib.Error {