maintainer/scripts/check-cherry-picks: fix calling from outside nixpkgs

The CI job calls this as trusted/maintainers/..., i.e. with a working
directory outside the checkout. The git commands inside the script
assume to be inside the checkout, though, so let's force that.
This commit is contained in:
Wolfgang Walther 2025-05-27 20:00:24 +02:00
parent d283c3b36f
commit 642de212a6
No known key found for this signature in database
GPG key ID: B39893FA5F65CAE1

View file

@ -8,6 +8,9 @@ if [ $# != "2" ] ; then
exit 2
fi
# Make sure we are inside the nixpkgs repo, even when called from outside
cd "$(dirname "${BASH_SOURCE[0]}")"
PICKABLE_BRANCHES=${PICKABLE_BRANCHES:-master staging release-??.?? staging-??.??}
problem=0