Closed tudortimi closed 4 years ago
I'll have a look and see if I can figure out how to write a test for this that unsets GIT_ISSUE_LIB_PATH
and tries to run the script.
I think the current LIB_PATH
setting caters to the case where, say, the binary is installed in /usr/local/bin/git-issue
. This would introduce /usr/local/lib
into the LIB_PATH
.
/usr/local/lib
is already injected explicitly.
If you think the $(dirname $0)/../lib
might be needed for some other use case, we could leave it, but we definitely need $(dirname $0)/lib
to support the git config --global alias.issue '!'"${REPO_PATH}/git-issue.sh"
use case described in the README.
I meant /usr/local/bin
as an example. Consider as a better example /app/git-issue/bin
.
I agree to add the $(dirname $0)/lib
case.
Fixed by #77
I tried to run
git-issue.sh
directly without installing it, but I get the following error:In the script itself I found:
This looks suspicious, as
$(dirname $0)
should return already return the path to the repo root. If I change it to$(dirname $0)/lib
, then everything works.The tests work, because the
test.sh
script explicitly setsGIT_ISSUE_LIB_PATH
to$(pwd)/lib
.