Skip to content

Commit

Permalink
test-lib: Work around incompatible sort and find on Windows
Browse files Browse the repository at this point in the history
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 <j6t@kdbg.org>
  • Loading branch information
Johannes Sixt committed Mar 19, 2009
1 parent a8cbc9a commit f17e9fb
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions t/test-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f17e9fb

Please sign in to comment.