Fix false positives in t3404 due to SHELL=/bin/false
[gitweb.git] / t / t3404-rebase-interactive.sh
index af3b663aeee8354c6f8f2dff05666f6d70c07055..9e9474e9447c8835eb4ef30714b577896a06924d 100755 (executable)
@@ -67,8 +67,9 @@ test_expect_success 'setup' '
 # "exec" commands are ran with the user shell by default, but this may
 # be non-POSIX. For example, if SHELL=zsh then ">file" doesn't work
 # to create a file. Unseting SHELL avoids such non-portable behavior
-# in tests.
+# in tests. It must be exported for it to take effect where needed.
 SHELL=
+export SHELL
 
 test_expect_success 'rebase -i with the exec command' '
        git checkout master &&
@@ -101,10 +102,10 @@ test_expect_success 'rebase -i with the exec command' '
 
 test_expect_success 'rebase -i with the exec command runs from tree root' '
        git checkout master &&
-       mkdir subdir && cd subdir &&
+       mkdir subdir && (cd subdir &&
        FAKE_LINES="1 exec_>touch-subdir" \
-               git rebase -i HEAD^ &&
-       cd .. &&
+               git rebase -i HEAD^
+       ) &&
        test_path_is_file touch-subdir &&
        rm -fr subdir
 '