tests.fetchgit.fetchTags: fix flaky test by removing .git directory after getting tags

Closes #412967
This commit is contained in:
Philip Taron 2025-06-02 10:51:02 -07:00
parent d3df330c5c
commit 7ee611b07f
No known key found for this signature in database

View file

@ -90,9 +90,11 @@
rev = "9d9dbe6ed05854e03811c361a3380e09183f4f4a";
fetchTags = true;
leaveDotGit = true;
sha256 = "sha256-2vfZnYjZlnC8ODz6B6aOqAqtb1Wbjojnn/5TmzwUrmo=";
sha256 = "sha256-y7l+46lVP2pzJwGON5qEV0EoxWofRoWAym5q9VXvpc8=";
postFetch = ''
cd $out && git describe --tags --always > describe-output.txt 2>&1 || echo "git describe failed" > describe-output.txt
# See https://github.com/NixOS/nixpkgs/issues/412967#issuecomment-2927452118
rm -rf .git
'';
};
}