Преглед изворни кода

admin:publish 代码优化

jqh пре 4 година
родитељ
комит
fe38fd0b7e
1 измењених фајлова са 9 додато и 1 уклоњено
  1. 9 1
      src/Console/PublishCommand.php

+ 9 - 1
src/Console/PublishCommand.php

@@ -53,8 +53,16 @@ class PublishCommand extends Command
             $tags[] = 'dcat-admin-config';
         }
 
+        if (! $tags) {
+            $tags[] = null;
+        }
+
         foreach ($tags as $tag) {
-            $this->call('vendor:publish', $options + ['--tag' => $tag]);
+            if ($tag) {
+                $options['--tag'] = $tag;
+            }
+
+            $this->call('vendor:publish', $options);
         }
 
         $this->call('view:clear');