by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Daniel Rose
    @daniel-rose
    hi guys
    why are you using an absolute path for grumphp in the git hook?
    Daniel Rose
    @daniel-rose
    daniel-rose/grumphp@6f3e987
    Toon Verwerft
    @veewee
    Hi Daniel,
    not sure why the absolute path is being used there. That part has been tweeked a lot to make it fully compatible with windows. It might also work with relative paths. This change would require some manual testing.
    Daniel Rose
    @daniel-rose
    i think the problem with vargant or docker will be fixed.
    Toon Verwerft
    @veewee
    What problem are you talking about?
    Daniel Rose
    @daniel-rose
    if i make a composer up in a docker container, the path in the git hook file is different to the host machine.
    if i commit all over the host machine, the path to grumphp does not exists.
    do you understand the problem?
    Toon Verwerft
    @veewee
    yeah, I think so
    The solution you propose looks good, but I am not sure it will work in every windows specific contexts
    On second view: binDir is not always the PATH that should be used
    The executableFinder also searches your local PATHs to find the executable
    Daniel Rose
    @daniel-rose
    ah okay
    but what is the default case?
    Toon Verwerft
    @veewee
    By default the absolute path is generated by \Symfony\Component\Process\ExecutableFinder
    or relative if the extraDirs matches (so when the binDir is being used)
    Daniel Rose
    @daniel-rose
    for this, i must fill the extraDirs in composer.json
    Toon Verwerft
    @veewee
    no, it uses the binDir from the grumphp.yml file
    (which mostly points to the bin directory in composer.json)
    Daniel Rose
    @daniel-rose
    bin_dir: "./vendor/bin"
    this entry
    ?
    Toon Verwerft
    @veewee
    indeed
    Daniel Rose
    @daniel-rose
    okay is use this, but the path in the git-hook file will absolute.
    Toon Verwerft
    @veewee
    That is the 'forceUnix' part in your diff: it will use pathinfo to force a unix path separator which will quote the git hook arguments on windows
    The easiest way to solve this issue locally is to run ./vendor/bin/grumphp git:init in the environment you commit
    Daniel Rose
    @daniel-rose
    okay