Beispiel #1
0
 /**
  * Symlink each known Git hook to the PHP Composter bootstrapping script.
  *
  * @since 0.1.0
  *
  * @param Filesystem $filesystem Reference to the Filesystem instance.
  */
 protected function createGitHooks(Filesystem $filesystem)
 {
     $hooksPath = Paths::getPath('root_hooks');
     $gitScriptPath = Paths::getPath('git_script');
     foreach ($this->getGitHookNames() as $githook) {
         $hookPath = $hooksPath . $githook;
         if (static::$io->isDebug()) {
             static::$io->write(sprintf(_('Symlinking %1$s to %2$s'), $hookPath, $gitScriptPath));
         }
         $filesystem->relativeSymlink($gitScriptPath, $hookPath);
     }
 }