commitpal
commitpal copied to clipboard
Loading a config file only works with relative paths 🤷♂️
Loading a config file only works with relative paths 🤷♂️
Examples
-
~ expansion e.g.
$ commitpal -c ~/.commitpal.config.json -n Error: /Users/jvernon/.commitpal.config.json not found ? Please choose a preset … Angular commit format Emoji Jira ticket
-
Absolute paths e.g.
$ commitpal -c /Users/jvernon/.commitpal.config.json -n Error: /Users/jvernon/.commitpal.config.json not found ? Please choose a preset … Angular commit format Emoji Jira ticket
-
Relative paths e.g.
commitpal -c ./.commitpal.config.json -n ? What type of change? … feature bugfix documentation style tests chore
This is my current workaround 😋
function gcp() {
if ! command -v commitpal &> /dev/null
then
npm install commitpal -g
fi
local config_path
config_path=$(realpath --relative-to=. ~/.commitpal.config.json)
commitpal -c "$config_path" -n
}
Then I can just run this from anywhere
$ gcp
Hey @joshuatvernon, thanks for raising this issue!
I'm pretty sure if the config file is not specified, commitpal will attempt to climb the file tree to find one! You could try omitting the config flag to see if it picks up the file in the meantime.
I'll have to look into fixing the issues with the flag, that's definitely a big problem (would love a PR if you're up to it 😄)