From 4d9f837cd139a24feb66724a71189ef8854fe47f Mon Sep 17 00:00:00 2001 From: John Smith Date: Mon, 17 Jan 2022 10:11:39 -0500 Subject: [PATCH] fix script for mac --- setup_flutter.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup_flutter.sh b/setup_flutter.sh index 5badc1a8..6f2bfea5 100755 --- a/setup_flutter.sh +++ b/setup_flutter.sh @@ -59,7 +59,11 @@ if [ "$OS" == "linux" ]; then elif [ "$OS" == "macos" ]; then # ensure packages are installed - brew install llvm + if [ "$BREW_USER" == "" ]; then + BREW_USER=`ls -lad /opt/homebrew/. | cut -d\ -f4` + echo "Must sudo to homebrew user \"$BREW_USER\":" + fi + sudo -H -u $BREW_USER brew install llvm sudo gem install cocoapods # ensure platforms are enabled in flutter