Initial commit
This commit is contained in:
24
skills/jira/scripts/check-environment.sh
Executable file
24
skills/jira/scripts/check-environment.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
echo "[jira-cli-skill] Verifying Jira CLI environment..."
|
||||
|
||||
if ! command -v jira >/dev/null 2>&1; then
|
||||
echo "ERROR: jira CLI not found in PATH."
|
||||
echo "Install it via 'brew install jira-cli' or follow https://github.com/ankitpokhrel/jira-cli#installation"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! jira version >/dev/null 2>&1; then
|
||||
echo "ERROR: jira CLI is installed but failed to report its version."
|
||||
echo "Run 'jira init' to configure credentials, then retry."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! jira me >/dev/null 2>&1; then
|
||||
echo "ERROR: jira CLI is not authenticated."
|
||||
echo "Run 'jira init' and ensure credentials are valid."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "[jira-cli-skill] Environment check passed."
|
||||
Reference in New Issue
Block a user