summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Sam Lewis <samclewis@google.com> 2024-09-24 19:47:08 +0000
committer Sam Lewis <samclewis@google.com> 2024-09-24 20:48:47 +0000
commit1513eab6f9f8126a61263a415fdf0614183b5f47 (patch)
tree3d63f2d17eaad643af17124616f731426bb72177
parent480c30410ca67f0ef65216163fe5419e3e29e49e (diff)
Remove prompt to repair Cog workspace
When builds are run from the Cider UI, the prompt will cause the command to hang. See the comments in aosp/3274365 for reasons why doing this automatically is not a concern: https://screenshot.googleplex.com/3vavnYbzqQSQ5Tu Bug: 362337892 Change-Id: Ic8e4567af5a5c99d4c345410622ccb1e2fcee330
-rw-r--r--shell_utils.sh13
1 files changed, 4 insertions, 9 deletions
diff --git a/shell_utils.sh b/shell_utils.sh
index 6cc8c9e485..c4a67564c2 100644
--- a/shell_utils.sh
+++ b/shell_utils.sh
@@ -109,16 +109,11 @@ function setup_cog_symlink() {
local link_destination="${HOME}/.cog/android-build-out"
- # if there's a local out/ dir, prompt the user to remove it.
- # fail out if they say no.
- local answer
+ # remove existing out/ dir if it exists
if [[ -d "$out_dir" ]]; then
- echo "Detected existing out/ directory in the Cog workspace which is not supported. Can we repair your workspace by removing it and creating the symlink to ~/.cog/android-build-out instead? (y/N): "
- read -r answer
- if [[ $answer =~ ^[Yy]$ ]]; then
- rm -rf "$out_dir"
- else
- echo "Exiting due to unsupported out/ directory."
+ echo "Detected existing out/ directory in the Cog workspace which is not supported. Repairing workspace by removing it and creating the symlink to ~/.cog/android-build-out"
+ if ! rm -rf "$out_dir"; then
+ echo "Failed to remove existing out/ directory: $out_dir" >&2
kill -INT $$ # exits the script without exiting the user's shell
fi
fi