aboutsummaryrefslogtreecommitdiff
path: root/t/t0061-run-command.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-04-20 15:50:03 -0700
committerJunio C Hamano <gitster@pobox.com>2012-04-20 15:50:03 -0700
commitbd6f71d1fca865507b3f0a9e310b4d02632cf0ce (patch)
tree9ec8bf5af578538c1f690e8169fc123cb7434dea /t/t0061-run-command.sh
parent27da1cf65b9f30a51c061409c697f94b9b56b09c (diff)
parent38f865c27d1f2560afb48efd2b7b105c1278c4b5 (diff)
downloadgit-bd6f71d1fca865507b3f0a9e310b4d02632cf0ce.tar.gz
git-bd6f71d1fca865507b3f0a9e310b4d02632cf0ce.tar.xz
Merge branch 'jk/run-command-eacces'
When PATH contains an unreadable directory, alias expansion code did not kick in, and failed with an error that said "git-subcmd" was not found. By Jeff King (1) and Ramsay Jones (1) * jk/run-command-eacces: run-command: treat inaccessible directories as ENOENT compat/mingw.[ch]: Change return type of exec functions to int
Diffstat (limited to 't/t0061-run-command.sh')
-rwxr-xr-xt/t0061-run-command.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t0061-run-command.sh b/t/t0061-run-command.sh
index 8d4938f01..17e969df6 100755
--- a/t/t0061-run-command.sh
+++ b/t/t0061-run-command.sh
@@ -34,4 +34,17 @@ test_expect_success POSIXPERM 'run_command reports EACCES' '
grep "fatal: cannot exec.*hello.sh" err
'
+test_expect_success POSIXPERM 'unreadable directory in PATH' '
+ mkdir local-command &&
+ test_when_finished "chmod u+rwx local-command && rm -fr local-command" &&
+ git config alias.nitfol "!echo frotz" &&
+ chmod a-rx local-command &&
+ (
+ PATH=./local-command:$PATH &&
+ git nitfol >actual
+ ) &&
+ echo frotz >expect &&
+ test_cmp expect actual
+'
+
test_done