Move cog setup logic into shell_utils so it can be used when any of these commands are run:
- `m`
- `lunch`
- `source build/envsetup.sh`
this will set up the symlink properly regardless of the order of commands so users don't get stuck with a broken build
Bug: 362337892
Change-Id: Ibd3b262107dfc1024cd83ab8aeb33a299fb0ffb2
diff --git a/tools/ide_query/ide_query.sh b/tools/ide_query/ide_query.sh
index 6f9b0c4..8dfffc1 100755
--- a/tools/ide_query/ide_query.sh
+++ b/tools/ide_query/ide_query.sh
@@ -19,7 +19,7 @@
require_top
# Ensure cogsetup (out/ will be symlink outside the repo)
-. ${TOP}/build/make/cogsetup.sh
+setup_cog_env_if_needed
case $(uname -s) in
Linux)