Coder Social home page Coder Social logo

Comments (7)

heiglandreas avatar heiglandreas commented on August 30, 2024 2

Have a look at https://github.com/CaptainHookPhp/captainhook/blob/master/composer.json#L46 ;-)

from captainhook.

sebastianfeldmann avatar sebastianfeldmann commented on August 30, 2024

Hi and thank you

You can use the --git-directory option to define the path to your git directory. For example like this.

$ vendor/bin/captainhook install --git-directory=../../.git

Check the install command help for more options.

./captainhook install --help
Usage:
  install [options] [--] [<hook>]

Arguments:
  hook                                 Hook you want to install

Options:
  -c, --configuration[=CONFIGURATION]  Path to your json configuration [default: "./captainhook.json"]
  -f, --force                          Force to overwrite existing hooks
  -g, --git-directory[=GIT-DIRECTORY]  Path to your .git directory [default: "./.git"]
  -h, --help                           Display this help message
  -q, --quiet                          Do not output any message
  -V, --version                        Display this application version
      --ansi                           Force ANSI output
      --no-ansi                        Disable ANSI output
  -n, --no-interaction                 Do not ask any interactive question
  -v|vv|vvv, --verbose                 Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
  This command will install the git hooks to your .git directory

from captainhook.

chillichicken avatar chillichicken commented on August 30, 2024

I wasn't aware of these options. What a beauty ! Thanks heaps !

from captainhook.

sebastianfeldmann avatar sebastianfeldmann commented on August 30, 2024

My pleasure :)

from captainhook.

nntoan avatar nntoan commented on August 30, 2024

@sebastianfeldmann I'm wondering if this is possible without running the manual command like this? Can I add it into the captainhook.json or something similar?

Such as just composer install and boom!

from captainhook.

sebastianfeldmann avatar sebastianfeldmann commented on August 30, 2024

Thanks @heiglandreas for now that works only if you are using the plugin-composer package.

I think I will add a repository path configuration setting for the config section of captainhook.json as well

from captainhook.

alfredbez avatar alfredbez commented on August 30, 2024

The master branch changed and the link provided by @heiglandreas highlights now the wrong line here is the correct one: https://github.com/CaptainHookPhp/captainhook/blob/c6c735742693580f41b953bbad5cd4c178aaacf9/composer.json#L46

ProTip: You can hit y to replace master with the latest commit hash in the url.

The line was removed in 1eca82d

from captainhook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.