Fix uname flags for darwin in bin/lint (#4490)

The version of `uname` on Darwin doesn't support the `-o` flag, resulting in an error message when running the `bin/lint` script. 

We add an if-branch to short-circuit the `uname-o` call if running on Darwin.

Signed-off-by: Alex Leong <alex@buoyant.io>
This commit is contained in:
Alex Leong 2020-06-02 13:02:07 -07:00 committed by GitHub
parent d7f84e6c7b
commit 5635f7377f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -13,7 +13,10 @@ targetbin=$rootdir/target/bin
cd "$rootdir"
exe=
if [ "$(uname -o)" = Msys ]; then
if [ "$(uname -s)" = Darwin ]; then
# Darwin's uname doesn't support the -o flag so we short circuit here.
:;
elif [ "$(uname -o)" = Msys ]; then
exe=.exe
fi