Exclude CI from tool root check (#78885)

This commit is contained in:
Jenn Magder 2021-03-23 14:57:01 -07:00 committed by GitHub
parent 5efc7169eb
commit 891511d58f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -190,8 +190,8 @@ function shared::execute() {
;;
esac
# Test if running as superuser but don't warn if running within Docker
if [[ "$EUID" == "0" && ! -f /.dockerenv ]]; then
# Test if running as superuser but don't warn if running within Docker or CI.
if [[ "$EUID" == "0" && ! -f /.dockerenv && "$CI" != "true" && "$BOT" != "true" && "$CONTINUOUS_INTEGRATION" != "true" ]]; then
>&2 echo " Woah! You appear to be trying to run flutter as root."
>&2 echo " We strongly recommend running the flutter tool without superuser privileges."
>&2 echo " /"