Skip to content

Commit

Permalink
Get the symlinking/unlinking right this time.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Oct 20, 2017
1 parent e5269a7 commit c0595a7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions composer.json
Expand Up @@ -51,6 +51,7 @@
},
"scripts": {
"post-install-cmd": "Horde\\GitTools\\Callbacks::linkHordeRole",
"pre-update-cmd": "Horde\\GitTools\\Callbacks::unlinkHordeRole",
"post-update-cmd": "Horde\\GitTools\\Callbacks::linkHordeRole"
}
}
13 changes: 13 additions & 0 deletions lib/Callbacks.php
Expand Up @@ -37,4 +37,17 @@ public static function linkHordeRole(Event $event)
dirname(__FILE__) . '/../vendor/pear/pear/PEAR/Installer/Role/Horde.xml'
);
}

/**
* Unlinks the Horde_Role files needed to detect "Horde" as a valid role
* when using PEAR via Composer.
*
* @param Event $event [description]
* @return [type] [description]
*/
public static function unlinkHordeRole(Event $event)
{
unlink(dirname(__FILE__) . '/../vendor/pear/pear/PEAR/Installer/Role/Horde.php');
unlink(dirname(__FILE__) . '/../vendor/pear/pear/PEAR/Installer/Role/Horde.xml');
}
}

0 comments on commit c0595a7

Please sign in to comment.