File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
lib/internal/Magento/Framework/App/Filesystem
setup/src/Magento/Setup/Model Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,11 @@ class DirectoryList extends \Magento\Framework\Filesystem\DirectoryList
110
110
*/
111
111
const UPLOAD = 'upload ' ;
112
112
113
+ /**
114
+ * Directory to store composer related files (config, cache etc.) in case if composer runs by Magento Application
115
+ */
116
+ const COMPOSER_HOME = 'composer_home ' ;
117
+
113
118
/**
114
119
* A suffix for temporary materialization directory where pre-processed files will be written (if necessary)
115
120
*/
@@ -145,6 +150,7 @@ public static function getDefaultConfig()
145
150
self ::TMP_MATERIALIZATION_DIR => [parent ::PATH => 'var/view_preprocessed ' ],
146
151
self ::TEMPLATE_MINIFICATION_DIR => [parent ::PATH => 'var/view_preprocessed/html ' ],
147
152
self ::SETUP => [parent ::PATH => 'setup/src ' ],
153
+ self ::COMPOSER_HOME => [parent ::PATH => 'var/composer_home ' ],
148
154
];
149
155
return parent ::getDefaultConfig () + $ result ;
150
156
}
Original file line number Diff line number Diff line change @@ -50,6 +50,8 @@ public function __construct(
50
50
throw new \Exception ('Composer file not found: ' . $ composerJson );
51
51
}
52
52
53
+ putenv ('COMPOSER_HOME= ' .$ filesystem ->getDirectoryRead (DirectoryList::COMPOSER_HOME )->getAbsolutePath ());
54
+
53
55
// Create Composer
54
56
$ this ->composer = ComposerFactory::create ($ io , $ composerJson );
55
57
$ this ->locker = $ this ->composer ->getLocker ();
You can’t perform that action at this time.
0 commit comments