[gnome-ostree/wip/gjs-round2] prefix: Update for new main() execution
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-ostree/wip/gjs-round2] prefix: Update for new main() execution
- Date: Fri, 14 Dec 2012 21:47:55 +0000 (UTC)
commit cc9046b7ac5f81940968c344bdf4965324e3b891
Author: Colin Walters <walters verbum org>
Date: Fri Dec 14 16:47:27 2012 -0500
prefix: Update for new main() execution
src/ostbuild/js/prefix.js | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/src/ostbuild/js/prefix.js b/src/ostbuild/js/prefix.js
index e4eaf7f..f39358f 100644
--- a/src/ostbuild/js/prefix.js
+++ b/src/ostbuild/js/prefix.js
@@ -50,7 +50,11 @@ const Prefix = new Lang.Class({
},
});
-var prefix = new Prefix();
-GLib.idle_add(GLib.PRIORITY_DEFAULT,
- function() { try { prefix.execute(ARGV); } finally { loop.quit(); }; return false; });
-loop.run();
+function main(argv) {
+ let ecode = 1;
+ var app = new Prefix();
+ GLib.idle_add(GLib.PRIORITY_DEFAULT,
+ function() { try { app.execute(argv); ecode = 0; } finally { loop.quit(); }; return false; });
+ loop.run();
+ return ecode;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]