GNU bug report logs - #54435
The test mailcap-parsing-and-mailcap-mime-info forgets to restore the HOME environment variable

Previous Next

Package: emacs;

Reported by: Felix Dietrich <felix.dietrich <at> sperrhaken.name>

Date: Thu, 17 Mar 2022 14:17:01 UTC

Severity: minor

Tags: patch

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Felix Dietrich <felix.dietrich <at> sperrhaken.name>
To: 54435 <at> debbugs.gnu.org
Subject: bug#54435: The test mailcap-parsing-and-mailcap-mime-info forgets to restore the HOME environment variable
Date: Thu, 17 Mar 2022 15:16:19 +0100
[Message part 1 (text/plain, inline)]
Severity: minor
Tags: patch

Running the test ‘mailcap-parsing-and-mailcap-mime-info’ will set the
HOME environment variable to a temporary directory.  After the test the
directory is removed (thanks to the ‘ert-with-temp-directory’ macro),
but the value of the environment variable not restored, polluting the
state of a running Emacs and affecting later commands in the Emacs
session, like the vc-* commands when git cannot find its global
configuration anymore.

The patch wraps the test in a ‘let’ and ‘unwind-protect’ to restore the
value of the environment variable after the test has been run.

[0001-mailcap-tests-Restore-HOME-environment-variable.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]

-- 
Felix Dietrich

This bug report was last modified 3 years and 66 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.