1
0
Fork 0

Add support for env vars and ~ (for HOME) in repo paths for vcs and artifact repositories, fixes #11409 (#11453)

pull/11459/head
Jordi Boggiano 2023-05-07 13:53:32 +02:00 committed by GitHub
parent cbb7319963
commit 3bb191a464
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -17,6 +17,7 @@ use Composer\Json\JsonFile;
use Composer\Package\BasePackage;
use Composer\Package\Loader\ArrayLoader;
use Composer\Package\Loader\LoaderInterface;
use Composer\Util\Platform;
use Composer\Util\Tar;
use Composer\Util\Zip;
@ -46,7 +47,7 @@ class ArtifactRepository extends ArrayRepository implements ConfigurableReposito
}
$this->loader = new ArrayLoader();
$this->lookup = $repoConfig['url'];
$this->lookup = Platform::expandPath($repoConfig['url']);
$this->io = $io;
$this->repoConfig = $repoConfig;
}

View File

@ -21,6 +21,7 @@ use Composer\Package\Loader\ValidatingArrayLoader;
use Composer\Package\Loader\InvalidPackageException;
use Composer\Package\Loader\LoaderInterface;
use Composer\EventDispatcher\EventDispatcher;
use Composer\Util\Platform;
use Composer\Util\ProcessExecutor;
use Composer\Util\HttpDownloader;
use Composer\Util\Url;
@ -90,7 +91,7 @@ class VcsRepository extends ArrayRepository implements ConfigurableRepositoryInt
'svn' => 'Composer\Repository\Vcs\SvnDriver',
];
$this->url = $repoConfig['url'];
$this->url = Platform::expandPath($repoConfig['url']);
$this->io = $io;
$this->type = $repoConfig['type'] ?? 'vcs';
$this->isVerbose = $io->isVerbose();