From 9dc62222889e310ba20a7aa1c4f4b9fc9434d6c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20Rodr=C3=ADguez?= Date: Wed, 21 Feb 2018 00:49:11 -0300 Subject: [PATCH] Allow using fossil dependency in a fossil repository, fixes #7125, closes #7126 --- src/Composer/Downloader/FossilDownloader.php | 2 +- src/Composer/Repository/Vcs/FossilDriver.php | 2 +- tests/Composer/Test/Downloader/FossilDownloaderTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Composer/Downloader/FossilDownloader.php b/src/Composer/Downloader/FossilDownloader.php index 6dd4c0c42..135e973e0 100644 --- a/src/Composer/Downloader/FossilDownloader.php +++ b/src/Composer/Downloader/FossilDownloader.php @@ -36,7 +36,7 @@ class FossilDownloader extends VcsDownloader if (0 !== $this->process->execute($command, $ignoredOutput)) { throw new \RuntimeException('Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput()); } - $command = sprintf('fossil open %s', ProcessExecutor::escape($repoFile)); + $command = sprintf('fossil open %s --nested', ProcessExecutor::escape($repoFile)); if (0 !== $this->process->execute($command, $ignoredOutput, realpath($path))) { throw new \RuntimeException('Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput()); } diff --git a/src/Composer/Repository/Vcs/FossilDriver.php b/src/Composer/Repository/Vcs/FossilDriver.php index 7af97ad3e..0b689e7bf 100644 --- a/src/Composer/Repository/Vcs/FossilDriver.php +++ b/src/Composer/Repository/Vcs/FossilDriver.php @@ -96,7 +96,7 @@ class FossilDriver extends VcsDriver throw new \RuntimeException('Failed to clone '.$this->url.' to repository ' . $this->repoFile . "\n\n" .$output); } - if (0 !== $this->process->execute(sprintf('fossil open %s', ProcessExecutor::escape($this->repoFile)), $output, $this->checkoutDir)) { + if (0 !== $this->process->execute(sprintf('fossil open %s --nested', ProcessExecutor::escape($this->repoFile)), $output, $this->checkoutDir)) { $output = $this->process->getErrorOutput(); throw new \RuntimeException('Failed to open repository '.$this->repoFile.' in ' . $this->checkoutDir . "\n\n" .$output); diff --git a/tests/Composer/Test/Downloader/FossilDownloaderTest.php b/tests/Composer/Test/Downloader/FossilDownloaderTest.php index 2e1de934d..961686bef 100644 --- a/tests/Composer/Test/Downloader/FossilDownloaderTest.php +++ b/tests/Composer/Test/Downloader/FossilDownloaderTest.php @@ -76,7 +76,7 @@ class FossilDownloaderTest extends TestCase ->with($this->equalTo($expectedFossilCommand)) ->will($this->returnValue(0)); - $expectedFossilCommand = $this->getCmd('fossil open \'repo.fossil\''); + $expectedFossilCommand = $this->getCmd('fossil open \'repo.fossil\' --nested'); $processExecutor->expects($this->at(1)) ->method('execute') ->with($this->equalTo($expectedFossilCommand))