瀏覽代碼

Ignore upgrade check if user haven't published config yet

Sang Nguyen 2 年之前
父節點
當前提交
8319822f2c
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/Commands/GenerateDocumentation.php

+ 4 - 0
src/Commands/GenerateDocumentation.php

@@ -155,6 +155,10 @@ class GenerateDocumentation extends Command
 
         $this->info("Checking for any pending upgrades to your config file...");
         try {
+            if (! $this->laravel['files']->exists($this->laravel->configPath("{$this->configName}.php"))) {
+                return;
+            }
+
             $upgrader = Upgrader::ofConfigFile("config/{$this->configName}.php", __DIR__ . '/../../config/scribe.php')
                 ->dontTouch(
                     'routes', 'example_languages', 'database_connections_to_transact', 'strategies', 'laravel.middleware',