Add support for env vars and ~ (for HOME) in repo paths for vcs and artifact repositories, fixes #11409 (#11453)
parent
cbb7319963
commit
3bb191a464
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue