updated scripts
This commit is contained in:
20
sf-web-open
20
sf-web-open
@@ -50,6 +50,26 @@ while getopts ":o:p:Uh" opt; do
|
||||
esac
|
||||
done
|
||||
|
||||
# Silent environment check - verify SF CLI is available
|
||||
if ! command -v sf >/dev/null 2>&1; then
|
||||
echo "❌ Salesforce CLI (sf) not found!"
|
||||
echo
|
||||
echo "Running environment check to help you get started..."
|
||||
echo
|
||||
|
||||
# Try to find and run sf-check in the same directory as this script
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
if [[ -x "$SCRIPT_DIR/sf-check" ]]; then
|
||||
"$SCRIPT_DIR/sf-check"
|
||||
elif command -v sf-check >/dev/null 2>&1; then
|
||||
sf-check
|
||||
else
|
||||
echo "sf-check not found. Please install the Salesforce CLI from:"
|
||||
echo "https://developer.salesforce.com/tools/sfdxcli"
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CMD=(sf org open)
|
||||
|
||||
[[ -n "$ORG" ]] && CMD+=(--target-org "$ORG")
|
||||
|
||||
Reference in New Issue
Block a user