Skip to content

Commit

Permalink
fix: allow abolute path
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka committed Aug 19, 2024
1 parent 207732e commit 777f8c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Command/LinkCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$wd = $input->getOption('working-directory') ?? $_SERVER['PWD'] ?? null;
$path = $input->getArgument('path') ?? null;

if (is_string($path)) {
if (is_string($path) && !str_starts_with($path, '/')) {
if (!$wd) {
throw new RuntimeException(sprintf('Can not find working directory, specify its value using "composer link %s --working-directory=$(pwd)"', $path));
}
Expand Down

0 comments on commit 777f8c0

Please sign in to comment.