From ec3da48f25a3df5ae2ea605dba909a61172d0922 Mon Sep 17 00:00:00 2001 From: jackqdyulei Date: Mon, 18 Sep 2017 17:05:12 -0700 Subject: Update error message in color check. Remind user if 'ANDROID_BUILD_TOP' hasn't been set Bug: 65850237 Test: In terminal without android environment, try to run 'repo upload' Change-Id: I7cbd903d3b2ac08ddbd3ae6912e7d1e0bc76d2ca --- checkcolor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/checkcolor.py b/checkcolor.py index 9e62d3d..204c7e5 100755 --- a/checkcolor.py +++ b/checkcolor.py @@ -72,6 +72,9 @@ def RunCheckOnProject(root): except OSError as e: if e.errno == errno.ENOENT: print 'Error in color lint check' + if not os.environ.get('ANDROID_BUILD_TOP'): + print 'Try setting up your environment first:' + print ' source build/envsetup.sh && lunch ' sys.exit(1) return (exitcode, stdout) -- cgit v1.2.3