Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH] tests: factor HOME=$(pwd) in test-lib.sh

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:49:24

Ævar Arnfjörð Bjarmason [off-list ref] writes:
On Mon, Aug 30, 2010 at 09:50, Matthieu Moy [off-list ref] wrote:
quoted
The same pattern is used in many tests, and makes it easy for new ones to
rely on $HOME being a trashable, clean, directory.
Looks good, but why not:
quoted
+HOME=$(pwd)
+export HOME
This instead:

HOME=$TRASH_DIRECTORY
export HOME

Looks like it might be more correct given this (always an absolute
path), but I haven't tested:
That should work too, but with your version, I have to think harder to
make sure $TRASH_DIRECTORY is absolute (that should be OK), and won't
make any issue with symlinks (I have no idea whether it is OK or not),
while it's trivially correct with mine (pwd is absolute, and the -P
option of the cd command right above prevents issue with symlinks).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help