From 234ef9d5fa8fd1ba9f17beb96f0cb6f2ffca4739 Mon Sep 17 00:00:00 2001 From: Carey Dayrit <52435698+careydayrit@users.noreply.github.com> Date: Tue, 12 Jul 2022 03:44:10 +0800 Subject: [PATCH] auto detect terminus, exit if not found --- admin-remove | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/admin-remove b/admin-remove index 49fc54e..c96bd3f 100755 --- a/admin-remove +++ b/admin-remove @@ -4,9 +4,14 @@ # A few basic items to configure here, before you run it. +if ! [ -x "$(command -v terminus)" ]; then + echo 'Error: The terminus command was not found. Please install it yourself and try again. https://pantheon.io/docs/terminus/install' >&2 + exit 1 +fi + # The full path to your Terminus command -# Example: TERMINUS_PATH="/Users/example_user/vendor/pantheon-systems/terminus" -TERMINUS_PATH="" +TERMINUS_PATH=$(command -v terminus) + # This is an array of Org machine names, separated by spaces. # Example: KEEP_ORGS=(org-example-1 org-example-2 pantheon-learning)