Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Dec 11, 2024
1 parent 510f328 commit c43a8e5
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/Foundation/Console/VendorPublishCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@ protected function status($from, $to, $type)
$pathLocation = function ($path) use ($laravelPath, $packagePath) {
$path = (string) realpath($path);

if (str_starts_with($path, $laravelPath)) {
return str_replace("{$laravelPath}/", '@laravel/', $path);
} elseif (str_starts_with($path, $packagePath)) {
return str_replace("{$packagePath}/", './', $path);
}

return $path;
return match (true) {
str_starts_with($path, $laravelPath) => str_replace("{$laravelPath}/", '@laravel/', $path),
str_starts_with($path, $packagePath) => str_replace("{$packagePath}/", './', $path),
default => $path,
};
};

$fromLocation = $pathLocation($from);
Expand Down

0 comments on commit c43a8e5

Please sign in to comment.