franzliedke / studio

A workbench for developing Composer packages.
MIT License
1.14k stars 73 forks source link

error when scrapping a package #23

Closed corbosman closed 9 years ago

corbosman commented 9 years ago

When I scrap a package I often see problems. Latest example follows.

vagrant@homestead:~/sites/portal [master] $ studio scrap php-acl
Do you really want to scrap the package at php-acl? [y|N] y
Removing package...
PHP Warning:  rmdir(/home/vagrant/sites/portal/php-acl/vendor/bin/phpspec): Not a directory in /home/vagrant/sites/portal/vendor/league/flysystem/src/Adapter/Local.php on line 322
PHP Stack trace:
PHP   1. {main}() /home/vagrant/sites/portal/vendor/franzl/studio/bin/studio:0
PHP   2. Symfony\Component\Console\Application->run() /home/vagrant/sites/portal/vendor/franzl/studio/bin/studio:20
PHP   3. Symfony\Component\Console\Application->doRun() /home/vagrant/sites/portal/vendor/symfony/console/Symfony/Component/Console/Application.php:126
PHP   4. Symfony\Component\Console\Application->doRunCommand() /home/vagrant/sites/portal/vendor/symfony/console/Symfony/Component/Console/Application.php:195
PHP   5. Symfony\Component\Console\Command\Command->run() /home/vagrant/sites/portal/vendor/symfony/console/Symfony/Component/Console/Application.php:874
PHP   6. Studio\Console\ScrapCommand->execute() /home/vagrant/sites/portal/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
PHP   7. League\Flysystem\Filesystem->deleteDir() /home/vagrant/sites/portal/vendor/franzl/studio/src/Console/ScrapCommand.php:56
PHP   8. League\Flysystem\Adapter\Local->deleteDir() /home/vagrant/sites/portal/vendor/league/flysystem/src/Filesystem.php:326
PHP   9. rmdir() /home/vagrant/sites/portal/vendor/league/flysystem/src/Adapter/Local.php:322

Warning: rmdir(/home/vagrant/sites/portal/php-acl/vendor/bin/phpspec): Not a directory in /home/vagrant/sites/portal/vendor/league/flysystem/src/Adapter/Local.php on line 322

Call Stack:
    0.0008     227624   1. {main}() /home/vagrant/sites/portal/vendor/franzl/studio/bin/studio:0
    0.2804    2172176   2. Symfony\Component\Console\Application->run() /home/vagrant/sites/portal/vendor/franzl/studio/bin/studio:20
    0.3427    2507656   3. Symfony\Component\Console\Application->doRun() /home/vagrant/sites/portal/vendor/symfony/console/Symfony/Component/Console/Application.php:126
    0.3429    2508576   4. Symfony\Component\Console\Application->doRunCommand() /home/vagrant/sites/portal/vendor/symfony/console/Symfony/Component/Console/Application.php:195
    0.3429    2509048   5. Symfony\Component\Console\Command\Command->run() /home/vagrant/sites/portal/vendor/symfony/console/Symfony/Component/Console/Application.php:874
    0.3432    2512776   6. Studio\Console\ScrapCommand->execute() /home/vagrant/sites/portal/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
    5.9695    2856960   7. League\Flysystem\Filesystem->deleteDir() /home/vagrant/sites/portal/vendor/franzl/studio/src/Console/ScrapCommand.php:56
    5.9696    2857304   8. League\Flysystem\Adapter\Local->deleteDir() /home/vagrant/sites/portal/vendor/league/flysystem/src/Filesystem.php:326
   12.4778    4267776   9. rmdir() /home/vagrant/sites/portal/vendor/league/flysystem/src/Adapter/Local.php:322
franzliedke commented 9 years ago

Thanks for the bug report! I've submitted a bug report to the Flysystem library as that seems to be the underlying issue: the recursive directory deletion fails when encountering a symlink.

That said, I'm curious: what's your use case for using this command? I had assumed I'm the only one using it as I test Studio features in my local installation. ;)

corbosman commented 9 years ago

You mean the scrap command or studio? I use studio to develop/debug laravel5 packages. I use scrap when im done and moved them to packagist. (we run our own internal toranproxy, which is a private packagist store).

franzliedke commented 9 years ago

Yeah, I was referring to scrap. Hehe, I haven't gotten that far yet (finishing a package), but that's a valid use case... great. :)

franzliedke commented 9 years ago

Seems to be fixed after fixing #24.