From f17e9fbbe919bc1f4ecaa35a9cb0869a5ec47fc0 Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Wed, 11 Mar 2009 21:17:26 +0100 Subject: [PATCH] test-lib: Work around incompatible sort and find on Windows If the PATH lists the Windows system directories before the MSYS directories, Windows's own incompatible sort and find commands would be picked up. We implement these commands as functions and call the real tools by absolute path. Signed-off-by: Johannes Sixt --- t/test-lib.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/t/test-lib.sh b/t/test-lib.sh index 638cca41e3..4eda5aba4b 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -635,3 +635,16 @@ do test_done esac done + +# Fix some commands on Windows +case $(uname -s) in +*MINGW*) + # Windows has its own (incompatible) sort and find + sort () { + /usr/bin/sort "$@" + } + find () { + /usr/bin/find "$@" + } + ;; +esac -- 2.11.4.GIT