Skip to content

Commit 04fdafd

Browse files
committed
skip copy errors
1 parent 1d237a1 commit 04fdafd

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/Traits/CopiesToBuildDirectory.php

+10-1
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,14 @@
1010
namespace Native\Electron\Traits;
1111

1212
use RecursiveCallbackFilterIterator;
13+
use Symfony\Component\Filesystem\Path;
14+
1315
use RecursiveDirectoryIterator;
1416
use RecursiveIteratorIterator;
1517
use Symfony\Component\Filesystem\Filesystem;
18+
use Throwable;
19+
20+
use function Laravel\Prompts\warning;
1621

1722
trait CopiesToBuildDirectory
1823
{
@@ -98,7 +103,11 @@ public function copyToBuildDirectory()
98103
continue;
99104
}
100105

101-
copy($item->getPathname(), $target);
106+
try {
107+
copy($item->getPathname(), $target);
108+
} catch (Throwable $e) {
109+
warning('[WARNING] ' . $e->getMessage());
110+
}
102111
}
103112

104113
$this->keepRequiredDirectories();

0 commit comments

Comments
 (0)