删除子目录时发生 Composer 运行时错误

删除子目录时发生 Composer 运行时错误

我正在我的服务器上运行“composer install”,然后使用脚本功能删除所有名为“.git”的子目录,但我在运行以下作曲家错误。

Delete all .git dirs
find: `vendor/ajbdev/authorizenet-php-api/.git': No such file or directory
find: `vendor/aura/installer-default/.git': No such file or directory
find: `vendor/buyplaytix/phantomjs-test/.git': No such file or directory
find: `vendor/composer/composer/.git': No such file or directory
find: `vendor/illuminate/support/Illuminate/Support/.git': No such file or directory
find: `vendor/illuminate/events/Illuminate/Events/.git': No such file or directory
find: `vendor/ircmaxell/password-compat/.git': No such file or directory
find: `vendor/predis/predis/.git': No such file or directory
find: `vendor/symfony/process/Symfony/Component/Process/.git': No such file or directory
find: `vendor/symfony/console/Symfony/Component/Console/.git': No such file or directory
find: `vendor/symfony/yaml/Symfony/Component/Yaml/.git': No such file or directory
find: `vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/.git': No such file or directory
find: `vendor/symfony/finder/Symfony/Component/Finder/.git': No such file or directory
find: `vendor/twig/twig/.git': No such file or directory
Script find vendor/*/ -name .git -type d -exec rm -rf {} \; handling the post-install-cmd event returned with an error



[RuntimeException]                                                                                         
Error Output: find: `vendor/ajbdev/authorizenet-php-api/.git': No such file or directory                   
find: `vendor/aura/installer-default/.git': No such file or directory                                      
find: `vendor/buyplaytix/phantomjs-test/.git': No such file or directory                                   
find: `vendor/composer/composer/.git': No such file or directory                                           
find: `vendor/illuminate/support/Illuminate/Support/.git': No such file or directory                       
find: `vendor/illuminate/events/Illuminate/Events/.git': No such file or directory                         
find: `vendor/ircmaxell/password-compat/.git': No such file or directory                                   
find: `vendor/predis/predis/.git': No such file or directory                                               
find: `vendor/symfony/process/Symfony/Component/Process/.git': No such file or directory                   
find: `vendor/symfony/console/Symfony/Component/Console/.git': No such file or directory                   
find: `vendor/symfony/yaml/Symfony/Component/Yaml/.git': No such file or directory                         
find: `vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/.git': No such file or directory  
find: `vendor/symfony/finder/Symfony/Component/Finder/.git': No such file or directory                     
find: `vendor/twig/twig/.git': No such file or directory                  

我使用以下命令运行它

"scripts": {
    "post-update-cmd": ["echo Delete all .git dirs", "find vendor/*/ -name .git -type d -exec rm -rf {} \\;"],
    "post-install-cmd": ["echo Delete all .git dirs", "find vendor/*/ -name .git -type d -exec rm -rf '{}' \\;"]
}                                 

有人能帮我解决这个问题吗?

相关内容