Skip to content

Commit 2a863fa

Browse files
committed
Fix copy error
When updating and moving files, check that getRealPath return something
1 parent 2740323 commit 2a863fa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/SourceRepositoryTypes/GithubRepositoryType.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,9 @@ public function update($version = '') : bool
148148

149149
// Now move all the files left in the main directory
150150
collect(File::allFiles($sourcePath, true))->each(function ($file) { /* @var \SplFileInfo $file */
151-
File::copy($file->getRealPath(), base_path($file->getFilename()));
151+
if($file->getRealPath()) {
152+
File::copy($file->getRealPath(), base_path($file->getFilename()));
153+
}
152154
});
153155

154156
File::deleteDirectory($sourcePath);

0 commit comments

Comments
 (0)