From 4ea2f28fd462b63fd097135966bacbd46b906cf2 Mon Sep 17 00:00:00 2001 From: Wisp X Date: Sun, 6 Mar 2022 21:01:26 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E9=85=8D=E7=BD=AE=20workflows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 2 -- app/Models/Strategy.php | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c348e3f8..b263f0a3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,8 +24,6 @@ jobs: run: php artisan key:generate - name: Directory Permissions run: chmod -R 777 storage bootstrap/cache - - name: Delete symlinks - run: find public -lname '*' -delete - name: Create Database run: | mkdir -p database diff --git a/app/Models/Strategy.php b/app/Models/Strategy.php index 4a2e50fb..cda7bfac 100644 --- a/app/Models/Strategy.php +++ b/app/Models/Strategy.php @@ -66,7 +66,7 @@ class Strategy extends Model $symlink = self::getRootPath($strategy->configs['url']); $target = $strategy->configs['root'] ?: config('filesystems.disks.uploads.root'); if (! is_dir(public_path($symlink))) { - (new Filesystem())->link($target, $symlink); + @(new Filesystem())->link($target, $symlink); } // 是否需要移除旧的符号链接 $url = $strategy->getOriginal('configs')['url'] ?? '';