ci: fix setup of custom path for GitLab CI
commit2c5c7639e59a73f1428fa6fb5dff647234046f59
authorPatrick Steinhardt <ps@pks.im>
Fri, 12 Apr 2024 04:44:27 +0000 (12 06:44 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 12 Apr 2024 15:47:50 +0000 (12 08:47 -0700)
tree286bb372b1943fd04909dcb28ff88c3ac4c1176a
parentd1ef3d3b1d562e3362de0886b18c8cc2df85c4b7
ci: fix setup of custom path for GitLab CI

Part of "install-dependencies.sh" is to install some binaries required
for tests into a custom directory that gets added to the PATH. This
directory is located at "$HOME/path" and thus depends on the current
user that the script executes as.

This creates problems for GitLab CI, which installs dependencies as the
root user, but runs tests as a separate, unprivileged user. As their
respective home directories are different, we will end up using two
different custom path directories. Consequently, the unprivileged user
will not be able to find the binaries that were set up as root user.

Fix this issue by allowing CI to override the custom path, which allows
GitLab to set up a constant value that isn't derived from "$HOME".

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
.gitlab-ci.yml
ci/lib.sh