builder: fix msys2

msys2 does not `/bin/command` or `/usr/bin/command`, check for these and
fall back to `/bin/sh -c "command $*"`.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2019-07-16 00:48:18 +00:00
parent 5802207829
commit e64b990415
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 7 additions and 1 deletions

View File

@ -2909,7 +2909,13 @@ gpg() {
}
command() {
/bin/command "$@"
if [ -x /bin/command ]; then
/bin/command "$@"
elif [ -x /usr/bin/command ]; then
/usr/bin/command "$@"
else
/bin/sh -c "command $*"
fi
}
fully_resolve_link() {