Properly handle options if core has just now been configured
authorJanne Koschinski <janne@kuschku.de>
Wed, 2 Jan 2019 18:35:43 +0000 (19:35 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Wed, 13 Feb 2019 19:26:24 +0000 (20:26 +0100)
src/core/core.cpp

index 47e04aa..a4133eb 100644 (file)
@@ -187,7 +187,9 @@ void Core::init()
             qInfo() << "Core is currently not configured! Please connect with a Quassel Client for basic setup.";
         }
     }
-    else {
+
+    // This checks separately because config-from-environment might have only configured the core just now
+    if (_configured) {
         if (Quassel::isOptionSet("add-user")) {
             bool success = createUser();
             throw ExitException{success ? EXIT_SUCCESS : EXIT_FAILURE};