-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Questions regarding "The .git directory is missing" #8840
Comments
This issue is caused by your If you want to avoid getting such |
Thank you, So, Is there anyway to at lease ignore the dialogue. Like passing --yes to the command?
|
--no-interaction / -n will make it reinstall automatically by default I believe. |
Unfortunately --no-interaction will out put it as error:
It it possible to have a solution or have --yes flag? |
The real solution is to install packages as dist if you don't want .git directories in them, or to just stop deleting .git directories.. |
The problem is that when you have a dev dependency pointing to git and then update to a dist release without git then This breaks production deployments and can bring sites down that have a simple composer install deploy strategy. I think composer should self-heal in We are still discussing if we should fix this in the Drupal .git remover script or simply make Composer more robust. Would you be willing to accept such a contribution? |
Sure if it can be done reasonably and with enough safeguards in place so that it doesn't misbehave and wipe dirs when it shouldn't, I'm open to it. |
We found a solution in our case, so I think we don't need to fix Composer. We had drupal-composer/drupal-project#223 active as composer script, which removes .git folder automatically for people that want to commit the vendor folder into their own git. We removed |
The above does not resolve the issue. I think since the is happening in the composer update command, It should handle by composer. I want to not have human interaction but there is not any good solution. |
@mohammadzo composer never removes a |
@stof Correct, but the expectation is to let composer to reinstall it without human interaction. |
Composer should automatically hit yes, I have never answered 'no' |
There is another dirty solution that involves removing the entire vendor folder and then installing. But yeah, the only correct solution, for now, is to keep the '.git' folder, which is a problem because we have so many projects with the '.git removal' script which needs to be manually edited. |
Hi there,
I am running to the issue like the following and I like ignore or pass yes to this. I also followed the doc but did not help.
if I go with --no-interaction it does not pass yes and I will get the following error:
Base on the information on https://getcomposer.org/commit-deps here is My composer.json.
My
composer.json
:When I run this command:
The text was updated successfully, but these errors were encountered: