From a5aaaa8422cee09bb69150d38ae8a632116e2268 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 6 Jun 2017 12:22:34 -0700 Subject: [PATCH] =?UTF-8?q?bin/flutter:=20don=E2=80=99t=20warn=20about=20r?= =?UTF-8?q?unning=20as=20root=20within=20Docker=20container=20(#10535)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes https://github.com/flutter/flutter/issues/10529 Via https://stackoverflow.com/a/25518345/39827 --- bin/flutter | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/flutter b/bin/flutter index 046e5a474ab..87708ccdb64 100755 --- a/bin/flutter +++ b/bin/flutter @@ -46,8 +46,8 @@ DART_SDK_PATH="$FLUTTER_ROOT/bin/cache/dart-sdk" DART="$DART_SDK_PATH/bin/dart" PUB="$DART_SDK_PATH/bin/pub" -# Test if running as superuser -if [[ "$EUID" == "0" ]]; then +# Test if running as superuser – but don't warn if running within Docker +if [[ "$EUID" == "0" ]] && ! [[ -f /.dockerenv ]]; then echo " Woah! You appear to be trying to run flutter as root." echo " We strongly recommend running the flutter tool without superuser privileges." echo " /"