tests: Fix setup of ephemeral home directories.
[gnupg.git] / tests / openpgp / defs.scm
index 4271ba0..815a560 100644 (file)
        (finally (unlink-recursively ,ephemeral-home-directory)
         (dynamic-wind
             (lambda ()
-              (force ,setup)
-              (setenv "GNUPGHOME" ,ephemeral-home-directory #t))
+              (setenv "GNUPGHOME" ,ephemeral-home-directory #t)
+              (with-working-directory ,ephemeral-home-directory (force ,setup)))
             (lambda () ,@expressions)
             (lambda () (setenv "GNUPGHOME" ,original-home-directory #t)))))))