From: Brandon Casey Date: Thu, 19 Jun 2008 20:39:14 GMT Subject: Re: [PATCH] t7502-commit.sh: test_must_fail doesn't work with inline environment variables Message-ID: In-Reply-To: <7vd4mduv3t.fsf@gitster.siamese.dyndns.org> Junio C Hamano wrote: > A Subshell? > > @@ -212,6 +212,7 @@ test_expect_success 'do not fire > # Must fail due to conflict > test_must_fail git cherry-pick -n master && > echo "editor not started" >.git/result && > - test_must_fail GIT_EDITOR="$(pwd)/.git/FAKE_EDITOR" git commit && > + ( GIT_EDITOR="$(pwd)/.git/FAKE_EDITOR" && export GIT_EDITOR && > + test_must_fail git commit ) && > test "$(cat .git/result)" = "editor not started" > ' That works and it's better. -brandon