drupal-tangler icon indicating copy to clipboard operation
drupal-tangler copied to clipboard

Using Commandline command doesn't tangle drupal

Open generalredneck opened this issue 11 years ago • 2 comments

I'm not 100% sure if this works by design since it's out of the context of composer running, however, I'm trying to do the following ./vendor/bin/drupal_tangle . www. This seems to me to be the equivilant to the defaults where are set here. When I do that, I get a www folder filled out with a sites/default folder and the vendor symlink. Do you have any idea why when I run just flat out ./vendor/bin/drupal_tangle that I get a full build vs that?

generalredneck avatar Jan 09 '15 15:01 generalredneck

When I print out the map generated by the two, the difference is that one has a full path and the other has a relative path

Using ./vendor/bin/drupal_tangle . new

array(9) {
  ["core"]=>
  array(1) {
    ["/var/www/sites/martincounty.dev/vendor/drupal/drupal"]=>
    string(35) "/var/www/sites/martincounty.dev/new"
  }
  ["module"]=>
  array(52) {
    ["/var/www/sites/martincounty.dev/vendor/drupal/ctools"]=>
    string(68) "/var/www/sites/martincounty.dev/new/sites/all/modules/contrib/ctools"
    ["/var/www/sites/martincounty.dev/vendor/drupal/views"]=>
    string(67) "/var/www/sites/martincounty.dev/new/sites/all/modules/contrib/views"
    ["/var/www/sites/martincounty.dev/vendor/drupal/variable"]=>
    string(70) "/var/www/sites/martincounty.
    ...

vs

Using ./vendor/bin/drupal_tangle

array(9) {
  ["core"]=>
  array(1) {
    ["vendor/drupal/drupal"]=>
    string(35) "/var/www/sites/martincounty.dev/www"
  }
  ["module"]=>
  array(52) {
    ["vendor/drupal/ctools"]=>
    string(68) "/var/www/sites/martincounty.dev/www/sites/all/modules/contrib/ctools"
    ["vendor/drupal/views"]=>
    string(67) "/var/www/sites/martincounty.dev/www/sites/all/modules/contrib/views"
    ["vendor/drupal/variable"]=>
    string(70) "/var/www/sites/martincounty.dev/www/sites/all/modules/contrib/variable"
   ...

generalredneck avatar Jan 09 '15 15:01 generalredneck

Ok there were a couple of issues here.

  1. the commandline wouldn't take full paths.
  2. Symfony's makePathRelative function seems to have issues with the directory .
  3. I had to make tangler distiguish between full paths and relative paths, because you would get full paths if you didn't use the default options.

I accidently made the changes to my PHP5.3 patch... so here's that. We will need to make the changes in a 5.4+ way later.

generalredneck avatar Jan 09 '15 18:01 generalredneck