Skip to content

Commit 6db12b6

Browse files
committed
MAGETWO-38919: Implement Component Dependencies Check
- added working dir option to run composer
1 parent a7a68c3 commit 6db12b6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/MagentoComposerApplication.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,19 @@ public function createComposer()
9797
* Runs composer command
9898
*
9999
* @param array $commandParams
100+
* @param string|null $workingDir
100101
* @return bool
101102
* @throws \RuntimeException
102103
*/
103-
public function runComposerCommand(array $commandParams)
104+
public function runComposerCommand(array $commandParams, $workingDir = null)
104105
{
105106
$this->consoleApplication->resetComposer();
106107

107-
$commandParams[self::COMPOSER_WORKING_DIR] = dirname($this->composerJson);
108+
if ($workingDir) {
109+
$commandParams[self::COMPOSER_WORKING_DIR] = $workingDir;
110+
} else {
111+
$commandParams[self::COMPOSER_WORKING_DIR] = dirname($this->composerJson);
112+
}
108113

109114
$input = $this->consoleArrayInputFactory->create($commandParams);
110115

0 commit comments

Comments
 (0)