magento-hackathon / magento-composer-installer

Composer installer for Magento modules
210 stars 154 forks source link

installation on Windows yields error when trying to create root-dir #105

Open oliver-graetz opened 10 years ago

oliver-graetz commented 10 years ago

Complete procedure:

G:\magetest>composer require connect20/mage_all_latest 1.8.1.0
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing justinrainbow/json-schema (1.3.6)
    Loading from cache

  - Installing icecave/isolator (2.2.1)
    Loading from cache

  - Installing eloquent/pops (3.1.1)
    Loading from cache

  - Installing eloquent/liberator (1.1.1)
    Loading from cache

  - Installing eloquent/enumeration (5.1.0)
    Loading from cache

  - Installing eloquent/composer-config-reader (2.0.0)
    Loading from cache

  - Installing magento-hackathon/magento-composer-installer (2.0.0)
    Loading from cache

please define your magento root dir [root]
magento root dir "root" missing! create now? [Y,n]

  [RuntimeException]
  \G: does not exist and could not be created.

Note the leading backslash in \G:. It seems that the path isn't formatted correctly.

oliver-graetz commented 10 years ago

The creation of the directory htdocs fails. If it already exists then the error does not occur. The previous beta3 release produces

[ErrorException]
magento root dir "G:\magetest\vendor/htdocs" is not valid

It searches for the root dir under vendors when in fact it is inside the prodject directory and also doesn't fail if the directory already exists.

bragento commented 10 years ago

Looks like your vendor dir is Not der properly. But in fact the DS isn't set correctly with a constant in the current installer version. I'll issue a PR ASAP. Still I'm curious why the vendor dir path is missing in the Exception path.

oliver-graetz commented 10 years ago

This starts with an empty directory and just calling composer require connect20/mage_all_latest 1.8.1.0 inside it. At the time of the exception the vendor directory exists and some packages are already installed inside it.

The "not valid" message from beta3 suggest that that version is sometimes looking for the root-dir at the wrong place. This could still be the problem with the final 2.0 release and just the output from the exception is broken "as a bonus".

I could finish the installation by creating the htdocs directory myself so the error just concerns the automatic creation process.