[icinga-checkins] icinga.org: icingaweb2-module-director/master: ConfigCommand: fix --force

git at icinga.org git at icinga.org
Tue Jun 28 14:18:09 CEST 2016


Module: icingaweb2-module-director
Branch: master
Commit: e858539d2b1593347a06100ab7bbea03a6369d12
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=e858539d2b1593347a06100ab7bbea03a6369d12

Author: Thomas Gelf <thomas at gelf.net>
Date:   Tue Jun 28 14:17:49 2016 +0200

ConfigCommand: fix --force

---

 application/clicommands/ConfigCommand.php |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/application/clicommands/ConfigCommand.php b/application/clicommands/ConfigCommand.php
index 85408e1..4cc40d6 100644
--- a/application/clicommands/ConfigCommand.php
+++ b/application/clicommands/ConfigCommand.php
@@ -67,14 +67,14 @@ class ConfigCommand extends Command
                 return;
             }
 
+        }
+
+        if ($api->dumpConfig($config, $db)) {
+            printf("Config '%s' has been deployed\n", $checksum);
         } else {
-            if ($api->dumpConfig($config, $db)) {
-                printf("Config '%s' has been deployed\n", $checksum);
-            } else {
-                $this->fail(
-                    sprintf("Failed to deploy config '%s'\n", $checksum)
-                );
-            }
+            $this->fail(
+                sprintf("Failed to deploy config '%s'\n", $checksum)
+            );
         }
     }
 



More information about the icinga-checkins mailing list