]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t0301-credential-cache.sh
t0301-credential-cache: use 'test_atexit' to stop the credentials helper
[thirdparty/git.git] / t / t0301-credential-cache.sh
index fd92533acf488fd7d1aedd8152b9edaafc9bd87d..ebd5fa5249ca276b739977739e8dea27aa6728aa 100755 (executable)
@@ -10,7 +10,7 @@ test -z "$NO_UNIX_SOCKETS" || {
 }
 
 # don't leave a stale daemon running
-trap 'code=$?; git credential-cache exit; (exit $code); die' EXIT
+test_atexit 'git credential-cache exit'
 
 # test that the daemon works with no special setup
 helper_test cache
@@ -108,9 +108,4 @@ test_expect_success SYMLINKS 'use user socket if user directory is a symlink to
 
 helper_test_timeout cache --timeout=1
 
-# we can't rely on our "trap" above working after test_done,
-# as test_done will delete the trash directory containing
-# our socket, leaving us with no way to access the daemon.
-git credential-cache exit
-
 test_done