diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/utils/gh-ready-check | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/utils/gh-ready-check b/scripts/utils/gh-ready-check new file mode 100755 index 0000000000..97c0ee6539 --- /dev/null +++ b/scripts/utils/gh-ready-check @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +set -eu + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +cd "$SCRIPT_DIR" + +# shellcheck source=scripts/utils/log +source ./log + +if ! command -v gh > /dev/null; then + log_error "gh (GitHub CLI) is required to run this script" + exit 1 +fi + +if ! gh auth status > /dev/null; then + log_error "Authentication through gh (GitHub CLI) is required to run this script" + exit 1 +fi |
