Hi, thanks for the wonderful plugin!
I've noticed the following nuisance:
When having a directory tree like the following:
vendor-bin/
├── php-cs-fixer/{composer.json/composer.lock,vendor/}
├── phpstan/{composer.json/composer.lock,vendor/}
└── empty-directory
Running composer install (or also composer update) will create an empty composer.json file and a freshly initialized composer.lock inside empty-directory/.
I'd want this to be skipped instead.
A scenario would be that i worked in one branch on setting up a new tool, then switched to a branch where this does not exist yet.
The empty directory will remain there.
Or I'm actually having a different kind of tool in there (we are using a general tools/directory, there can be more than just composer-bin sub-installations).
"bamarni-bin": {
"bin-links": false,
"forward-command": true,
"target-directory": "tools"
},
There seems to be some logic related to this in ensureComposerFileExists(), which creates the empty composer file.
I can't find a testcase related to this, but it seems to be related to symfony flex. Maybe it's possible to check if the directory contains flex related files (symfony.lock possibly?) before creating an empty composer-file.
Hi, thanks for the wonderful plugin!
I've noticed the following nuisance:
When having a directory tree like the following:
Running
composer install(or alsocomposer update) will create an emptycomposer.jsonfile and a freshly initializedcomposer.lockinsideempty-directory/.I'd want this to be skipped instead.
A scenario would be that i worked in one branch on setting up a new tool, then switched to a branch where this does not exist yet.
The empty directory will remain there.
Or I'm actually having a different kind of tool in there (we are using a general
tools/directory, there can be more than just composer-bin sub-installations).There seems to be some logic related to this in
ensureComposerFileExists(), which creates the empty composer file.I can't find a testcase related to this, but it seems to be related to symfony flex. Maybe it's possible to check if the directory contains flex related files (
symfony.lockpossibly?) before creating an empty composer-file.