From 32fa7ee8c31324617a235bdc3d39556dc1491b5b Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Mon, 14 Jun 2021 17:09:58 +0100 Subject: [PATCH] Add help message for likely typo to lunch Test: lunch aosp_blueline_userdebug Change-Id: Ieb8059d1717a98f66d61387d6bfd28470835eb6e --- envsetup.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/envsetup.sh b/envsetup.sh index 120f6e069c..bbb18e5f5c 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -703,6 +703,10 @@ function lunch() build_build_var_cache if [ $? -ne 0 ] then + if [[ "$product" =~ .*_(eng|user|userdebug) ]] + then + echo "Did you mean -${product/*_/}? (dash instead of underscore)" + fi return 1 fi export TARGET_PRODUCT=$(get_build_var TARGET_PRODUCT)