From 31dcb497a0dc6c462a064b4a0a8a40c238a88ce0 Mon Sep 17 00:00:00 2001 From: "maruel@chromium.org" Date: Thu, 12 May 2011 20:36:38 +0000 Subject: [PATCH] Early exit auto-update when running as root. Otherwise it can mess with file permissions. R=dpranke@chromium.org BUG= TEST= Review URL: http://codereview.chromium.org/7016002 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@85178 0039d316-1c4b-4281-b951-d872f2087c98 --- update_depot_tools | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/update_depot_tools b/update_depot_tools index a98e0ff89..b4e6089bb 100755 --- a/update_depot_tools +++ b/update_depot_tools @@ -5,6 +5,12 @@ # This script will try to sync the bootstrap directories and then defer control. +if [ "$USER" == "root" ]; +then + echo Running depot tools as root is sad. + exit +fi + base_dir=$(dirname "$0") if [ -L "$base_dir" ] then