Browse Source

fix: command run

Anankke 3 years ago
parent
commit
cbeae90e60
2 changed files with 2 additions and 3 deletions
  1. 1 2
      src/Command/Update.php
  2. 1 1
      xcat

+ 1 - 2
src/Command/Update.php

@@ -13,7 +13,7 @@ final class Update extends Command
 {
     public $description = '├─=: php xcat Update         - 更新并迁移配置' . PHP_EOL;
 
-    public function boot()
+    public function boot(): void
     {
         global $_ENV;
         $copy_result = copy(BASE_PATH . '/config/.config.php', BASE_PATH . '/config/.config.php.bak');
@@ -21,7 +21,6 @@ final class Update extends Command
             echo '备份成功' . PHP_EOL;
         } else {
             echo '备份失败,迁移终止' . PHP_EOL;
-            return false;
         }
 
         echo PHP_EOL;

+ 1 - 1
xcat

@@ -40,7 +40,7 @@ if (!isset($argv[1])) {
         if (!property_exists($triggerObject, 'description')) {
             continue;
         }
-        echo $triggerObject->description . PHP_EOL;
+        echo trim($triggerObject->description) . PHP_EOL;
     }
     return;
 }