diff options
| author | 2017-02-15 13:05:59 -0800 | |
|---|---|---|
| committer | 2017-02-15 13:07:17 -0800 | |
| commit | 969ca5a0d8928e4dd3697a834b891654630aac84 (patch) | |
| tree | fd012a50a4e36b6e27bd87c3434e46839139ffc2 | |
| parent | c631854b43ecd726efc902096abc4d9186cb397c (diff) | |
cpp-define-generator: presubmit hook prints better error message
Test: cd art && ../tools/repohooks/pre-upload.py
Bug: 35381554
Change-Id: Ia8536631c8c3117aeb0bf79862757717842b3a2b
| -rwxr-xr-x | tools/cpp-define-generator/presubmit-check-files-up-to-date | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/cpp-define-generator/presubmit-check-files-up-to-date b/tools/cpp-define-generator/presubmit-check-files-up-to-date index 67a702adc7..0301a3e679 100755 --- a/tools/cpp-define-generator/presubmit-check-files-up-to-date +++ b/tools/cpp-define-generator/presubmit-check-files-up-to-date @@ -22,7 +22,11 @@ GEN_TOOL=cpp-define-generator-data if ! which "$GEN_TOOL"; then - echo "ERROR: Please build cpp-define-generator-data or source build/envsetup.sh" >&2 + if [[ -z $ANDROID_BUILD_TOP ]]; then + echo "ERROR: Can't find '$GEN_TOOL' in \$PATH. Perhaps try 'source build/envsetup.sh' ?" >&2 + else + echo "ERROR: Can't find '$GEN_TOOL' in \$PATH. Perhaps try 'make $GEN_TOOL' ?" >&2 + fi exit 1 fi |