[composer] duplicate vendor

paul <[email protected]>
Newsgroups comp.lang.php
Organization Aioe.org NNTP Server
Message-ID <[email protected]>
I state that my question is not mainly about php, but composer.

Here's the question ...

+ cat .config/composer/config.json
{
     "repositories": {
         "b": {
             "type": "path",
             "url": "$PWD/b"
         },
         "c": {
             "type": "path",
             "url": "$PWD/c"
         }
     }
}

+ cat a/composer.json
{
     "require": {
         "test/b": "^1.0"
     }
}

+ cat b/composer.json
{
     "name": "test/b",
     "version": "1",
     "require": {
        "test/c": "^1.0"
     }
}

+ cat c/composer.json
{
     "name": "test/c",
     "version": "1"
}

As you can see, only the *test/b* package requires the *test/c* package.
However, as you will see below, the *vendor/test/c* directory I find it 
both under directory *b*, and under the directory *a*.

+ composer update --working-dir=b
+ composer update --working-dir=a
+ find | grep vendor/test/c
./b/vendor/test/c
./a/vendor/test/c

Can the directory *a* contains *vendor/test/c* be prevented?

-----BEGIN PGP MESSAGE-----

hQGMAyHa6HqE1N3qAQv+KYYFpZIEv8f+2NW2oSuvaVwYTJNGpU/w4sQNTVjrMkS7
gaqXzeyhD25Hgcgw844fWr4E0rW9OOrVu25/qz9QefpJUpzE+UQfwU0oDbWh/YvK
EEP61Nq0pFLrTojuA0rd0vVIRlQvbw4NdmLZlolUtdqaeqJNOe5HTW00gSL3g3GJ
LgwQpcixqZfvRvPeB5sMNzmgYKQsgQ3SNRgO2vFFavZNa/IBTcwIHTuh/WW/1+tc
NU1uNMUZyGPR6PM6MXTKWoRdS+L32WzrIaYd+zv92j9HnYM4zK/4ZzVO+Bfii0ni
XrnBF1RAn6XwzoUf1R9GncpVHJnkFw1HZ1naypcmbb/uX2wCyei35GZa6/QKQPWb
rxC5EG6o+Ry0+xaK9TZVWc5iFJ/WezufzoaAIL4yo8iXdcV/frD8252RKoDnx5qY
TMZKG1e181NYDqAIJRPQlwdGF3mMukyD7R7pDm+1RaUG9r0az4hQ7pt+OUyU0A70
IE5mnbr6G90nmfVRp/sK0oEBUKTvqP16qewTm9O+bxUA3jvgg8Mg93/6lTKLfOmC
K4wJ9+Op0fsBjMY1dbz/hrTIyYdiMPC5wYpvSmW8gN3O+AeFIs3DeRC2TanFS6Hw
+SZAIQFGLCz9aEZ4tLSZWioCFZsvWVTVJCv5E+1NEcgBIy7czVw0QaWhlHZsH+Nt
RB4=
=plmD
-----END PGP MESSAGE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.