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

Re: [PATCH] t7502-commit.sh: test_must_fail doesn't work with inline environment variables

From: Mike Hommey <hidden>
Date: 2016-06-15 22:44:47

On Thu, Jun 19, 2008 at 12:44:23PM -0500, Brandon Casey wrote:
Mike Hommey wrote:
quoted
On Thu, Jun 19, 2008 at 12:32:02PM -0500, Brandon Casey wrote:
quoted
-	test_must_fail GIT_EDITOR="$(pwd)/.git/FAKE_EDITOR" git commit &&
+	# We intentionally do not use test_must_fail on the next line since the
+	# mechanism does not work when setting environment variables inline
+	! GIT_EDITOR="$(pwd)/.git/FAKE_EDITOR" git commit &&
Doesn't GIT_EDITOR="$(pwd)/.git/FAKE_EDITOR" test_must_fail git commit
work ?
That leaves GIT_EDITOR set to the new value after the command completes.
It really shouldn't.

Mike
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help