The logic for finding the custom config command line argument would not work for all cases. In some cases the name of the binary would be the full path to cli.js so the check for 'simple-git-hooks' wouldn't work. It's sufficient to assume the config file path will always be at index 2.
The config file loader assumes that the given path is relative to the project directory, but this isn't necessarily the case for a custom config path (I could provide it as an absolute path). I fixed this by checking whether the path is already absolute.
The two issues:
cli.js
so the check for'simple-git-hooks'
wouldn't work. It's sufficient to assume the config file path will always be at index 2.