@@ -33,7 +33,7 @@ class Installer extends LibraryInstaller implements InstallerInterface
3333 *
3434 * @var \SplFileInfo
3535 */
36- protected $ defaultMagentoRootDir = 'root ' ;
36+ protected $ defaultMagentoRootDir = './ ' ;
3737
3838 /**
3939 * The base directory of the modman packages
@@ -124,19 +124,14 @@ public function __construct(IOInterface $io, Composer $composer, $type = 'magent
124124
125125 $ extra = $ composer ->getPackage ()->getExtra ();
126126
127- if (isset ($ extra ['magento-root-dir ' ]) || (( $ rootDirInput = $ io -> ask ( ' please define your magento root dir [ ' . $ this ->defaultMagentoRootDir . ' ] ' , $ this -> defaultMagentoRootDir )) || $ rootDirInput = $ this -> defaultMagentoRootDir ) ) {
127+ if (isset ($ extra ['magento-root-dir ' ]) || $ rootDirInput = $ this ->defaultMagentoRootDir ) {
128128
129129 if (isset ($ rootDirInput )) {
130130 $ extra ['magento-root-dir ' ] = $ rootDirInput ;
131- $ this ->updateJsonExtra ($ extra , $ io );
132131 }
133132
134133 $ dir = rtrim (trim ($ extra ['magento-root-dir ' ]), '/ \\' );
135134 $ this ->magentoRootDir = new \SplFileInfo ($ dir );
136- if (!is_dir ($ dir ) && $ io ->askConfirmation ('magento root dir " ' . $ dir . '" missing! create now? [Y,n] ' )) {
137- $ this ->initializeMagentoRootDir ($ dir );
138- $ io ->write ('magento root dir " ' . $ dir . '" created ' );
139- }
140135
141136 if (!is_dir ($ dir )) {
142137 $ dir = $ this ->vendorDir . "/ $ dir " ;
@@ -213,26 +208,6 @@ public function getDeployManager()
213208 {
214209 return $ this ->deployManager ;
215210 }
216-
217- /**
218- * Create base requrements for project installation
219- */
220- protected function initializeMagentoRootDir () {
221- if (!$ this ->magentoRootDir ->isDir ()) {
222- $ magentoRootPath = $ this ->magentoRootDir ->getPathname ();
223- $ pathParts = explode (DIRECTORY_SEPARATOR , $ magentoRootPath );
224- $ baseDir = explode (DIRECTORY_SEPARATOR , $ this ->vendorDir );
225- array_pop ($ baseDir );
226- $ pathParts = array_merge ($ baseDir , $ pathParts );
227- $ directoryPath = '' ;
228- foreach ($ pathParts as $ pathPart ) {
229- $ directoryPath .= $ pathPart . DIRECTORY_SEPARATOR ;
230- $ this ->filesystem ->ensureDirectoryExists ($ directoryPath );
231- }
232- }
233-
234- // $this->getSourceDir($package);
235- }
236211
237212
238213 /**
0 commit comments