]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t5801-remote-helpers.sh
tests: use "env" to run commands with temporary env-var settings
[thirdparty/git.git] / t / t5801-remote-helpers.sh
index 613f69a254bab23e1f09126b4a7f3dca8692deaa..ca1983827007738e5c8b0dec4a02f13631aaa75b 100755 (executable)
@@ -218,10 +218,8 @@ test_expect_success 'proper failure checks for fetching' '
 '
 
 test_expect_success 'proper failure checks for pushing' '
-       (GIT_REMOTE_TESTGIT_FAILURE=1 &&
-       export GIT_REMOTE_TESTGIT_FAILURE &&
-       cd local &&
-       test_must_fail git push --all
+       (cd local &&
+       test_must_fail env GIT_REMOTE_TESTGIT_FAILURE=1 git push --all
        )
 '