0neGal/viper-sh

Cannot find viper.json if XDG_CONFIG_HOME not set

mahmed2000 opened this issue · 1 comments

JSONPATH requires XDG_CONFIG_HOME to be set to read the file on line 6. Needs the same as on line 110

JSONPATH="$(jq -r .gamepath "$XDG_CONFIG_HOME/viper.json" 2> /dev/null)"
to
JSONPATH="$(jq -r .gamepath "${XDG_CONFIG_HOME:-$HOME/.config}/viper.json" 2> /dev/null)"

This should be fixed with 7d52145

I would like to point out that, if you already know the fix to a bug, it would be much better if you simply opened a pull request instead of an issue.