composer-patches-plugin icon indicating copy to clipboard operation
composer-patches-plugin copied to clipboard

Resolve custom vendor directories for relative patch files

Open Caffe1neAdd1ct opened this issue 6 years ago • 3 comments

I'm using a repo with patches contained inside pulled in via this patching plugin for composer:

https://github.com/zVPS/laravel-patches/blob/v4.2.22/composer.json

When installing via composer and a custom directory e.g /vendor-install via COMPOSER_VENDOR_DIR= I get an error as the patches need to be relative to the project root.

This pull request adds the functionality to check for vendor/ paths and translate to COMPOSER_VENDOR_DIR if specified.

Caffe1neAdd1ct avatar Mar 14 '19 10:03 Caffe1neAdd1ct

Raised with composer and the view is to fix this here not in composer.

https://github.com/composer/composer/issues/8035

Caffe1neAdd1ct avatar Mar 15 '19 10:03 Caffe1neAdd1ct

note that the vendor dir can also be customized through the config, not only from the env variable.

stof avatar Mar 15 '19 11:03 stof

Thanks @stof

Quick example for reference:

{
    "config": {
        "vendor-dir": "vendor-install"
    }
}

Caffe1neAdd1ct avatar Mar 15 '19 11:03 Caffe1neAdd1ct

Closing due to being abandoned.

CybotTM avatar Dec 12 '22 10:12 CybotTM