Skip to content

Commit 6c13a9e

Browse files
bug #797 Fixed directory separator trimming in vendors path (skmedix)
This PR was merged into the 1.13-dev branch. Discussion ---------- Fixed directory separator trimming in vendors path Fixes #796 We don't need to use `\DIRECTORY_SEPARATOR` here, as [**symfony/filesystem**](https://github.com/symfony/filesystem/blob/4.4/Filesystem.php#L451) already normalizes windows directory separator to use forward slash. Commits ------- fd34129 Fixed directory separator trimming in vendors path
2 parents 9a8b00b + fd34129 commit 6c13a9e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Flex.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ function ($value) {
520520
private function synchronizePackageJson(string $rootDir)
521521
{
522522
$rootDir = realpath($rootDir);
523-
$vendorDir = trim((new Filesystem())->makePathRelative($this->config->get('vendor-dir'), $rootDir), \DIRECTORY_SEPARATOR);
523+
$vendorDir = trim((new Filesystem())->makePathRelative($this->config->get('vendor-dir'), $rootDir), '/');
524524

525525
$synchronizer = new PackageJsonSynchronizer($rootDir, $vendorDir);
526526

0 commit comments

Comments
 (0)