diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-04-20 15:50:03 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-04-20 15:50:03 -0700 |
commit | bd6f71d1fca865507b3f0a9e310b4d02632cf0ce (patch) | |
tree | 9ec8bf5af578538c1f690e8169fc123cb7434dea /t | |
parent | 27da1cf65b9f30a51c061409c697f94b9b56b09c (diff) | |
parent | 38f865c27d1f2560afb48efd2b7b105c1278c4b5 (diff) | |
download | git-bd6f71d1fca865507b3f0a9e310b4d02632cf0ce.tar.gz |
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')
-rwxr-xr-x | t/t0061-run-command.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t0061-run-command.sh b/t/t0061-run-command.sh index 8d4938f019..17e969df60 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 |