Skip to content

Commit

Permalink
Make unlinking possible when directory is removed, remove test debug …
Browse files Browse the repository at this point in the history
…ouput (#45)

* Make unlinking possible when directory is removed
* Remove debug output from test
  • Loading branch information
SanderSander committed Aug 25, 2022
1 parent 385adaa commit d3fa772
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"scripts": {
"phpmd": "./vendor/bin/phpmd ./src,./tests ansi ruleset.xml",
"test": "./vendor/bin/phpunit --debug --testsuite=Unit",
"test": "./vendor/bin/phpunit --testsuite=Unit",
"test-integration": "./vendor/bin/phpunit --testsuite=Integration",
"phpstan": "./vendor/bin/phpstan",
"lint": "./vendor/bin/php-cs-fixer fix"
Expand Down
4 changes: 1 addition & 3 deletions src/Commands/UnlinkCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$paths = $this->getPaths($input);

foreach ($paths as $path) {
$linkedPackage = $this->plugin->getPackageFactory()->fromPath($path->getNormalizedPath());

$repository = $this->plugin->getRepository();
$linkedPackage = $repository->findByPath($linkedPackage->getPath());
$linkedPackage = $repository->findByPath($path->getNormalizedPath());

if ($linkedPackage === null) {
continue;
Expand Down

0 comments on commit d3fa772

Please sign in to comment.