Commit a5aaaa84 authored by Kevin Moore's avatar Kevin Moore Committed by Todd Volkert

bin/flutter: don’t warn about running as root within Docker container (#10535)

Closes https://github.com/flutter/flutter/issues/10529

Via https://stackoverflow.com/a/25518345/39827
parent c8e4cbf2
......@@ -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 " /"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment