public function installHooks(Event $event) : void
    {
        $event->getIO()->write('CaptainHook Composer Plugin');
        if (!$this->isCaptainHookInstalled()) {
            // reload the autoloader to make sure CaptainHook is available
            $vendorDir = $event->getComposer()->getConfig()->get('vendor-dir');
            require $vendorDir . '/autoload.php';
        }

        if (!$this->isCaptainHookInstalled()) {
            // if CaptainHook is still not available end the plugin execution
            // normally this only happens if CaptainHook gets uninstalled
            $event->getIO()->write(
                '  <info>CaptainHook not properly installed try to run composer update</info>' . PHP_EOL .
                PHP_EOL .
                'If you are uninstalling CaptainHook, we are sad seeing you go, ' .
                'but we would appreciate your feedback on your experience.' . PHP_EOL .
                'Just go to https://github.com/CaptainHookPhp/captainhook/issues to leave your feedback' . PHP_EOL .
                PHP_EOL .
                '<comment>WARNING: Don\'t forget to deactivate the hooks in your .git/hooks directory.</comment>'
            );
            return;
        }
        Cmd::setup($event);
    }