[gnome-weather/ewlsh/march-fixes-prerelease: 3/3] Only force exit on non-zero exit codes




commit e1bdf973f898b869d29e2f99359d46c244e45628
Author: Evan Welsh <contact evanwelsh com>
Date:   Sat Mar 5 16:26:58 2022 -0800

    Only force exit on non-zero exit codes

 src/app/main.js     | 3 ++-
 src/service/main.js | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/app/main.js b/src/app/main.js
index b6197eb..447961e 100644
--- a/src/app/main.js
+++ b/src/app/main.js
@@ -46,7 +46,8 @@ setTimeout(() => {
     const code = application.run([system.programInvocationName, ...system.programArgs]);
     application = null;
 
-    system.exit(code);
+    if (code !== 0)
+        system.exit(code);
 });
 
 imports.mainloop.run();
\ No newline at end of file
diff --git a/src/service/main.js b/src/service/main.js
index dfddeef..47638fa 100644
--- a/src/service/main.js
+++ b/src/service/main.js
@@ -115,7 +115,8 @@ export function main(argv) {
 
         const code = (new BackgroundService()).run(argv);
 
-        system.exit(code);
+        if (code !== 0)
+            system.exit(code);
     });
 
     imports.mainloop.run();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]