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 <j6t@kdbg.org>
This commit is contained in:
parent
a8cbc9ab02
commit
f17e9fbbe9
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user