Skip to content

Hook execution not working for non standard project setup #1

@icanhazstring

Description

@icanhazstring

Assume the following project structure

/path/to/project/.git
/path/to/project/subfolder/vendor/

Inside the folder /path/to/project/subfolder/ i will run the composer commands
composer require --dev sebastianfeldmann/captainhook:~1.0

What i get is this
/path/to/project/subfolder/bin/captainhook

Using this binary, i get the error that there is not .git folder available. Which is true because it is not inside the 'subfolder'. If i switch the folder to be beside the .git folder. The configure works fine. But the hooks itself won't work because of the hardcoded path to the vendor folder.

The hook path to vendor is always ../../vendor
Which should be ../../subfolder/vendor on my project.

Would be nice if the captainhook.json config can be given some kind of folder config for .git and vendor/ so the hooks can be configured in the right way.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions