[composer] duplicate vendor

Joined
Nov 8, 2022
Messages
2
Reaction score
0
Code:
+ 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.

Code:
+ 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?
 
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top