Skip to content

Commit

Permalink
[7.x] Use realpath() on vendor:publish output (#284)
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone authored Dec 22, 2024
1 parent f5ce246 commit 289b75a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Foundation/Console/VendorPublishCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,17 @@ class VendorPublishCommand extends Command
protected function status($from, $to, $type)
{
$format = function ($path) use ($type) {
if ($type === 'directory' && is_link($path)) {
return $path;
}

$realpath = realpath($path);

if ($realpath !== false) {
$path = $realpath;
}

return match (true) {
$type === 'directory' && is_link($path) => $path,
$this->files->exists($path) => $path,
default => (string) realpath($path),
};
Expand Down

0 comments on commit 289b75a

Please sign in to comment.