diff --git a/dot_local/bin/executable_gh-pr.sh b/dot_local/bin/executable_gh-pr.sh index e3c92be..309bb84 100644 --- a/dot_local/bin/executable_gh-pr.sh +++ b/dot_local/bin/executable_gh-pr.sh @@ -17,6 +17,12 @@ if ! command_exists git; then exit 1 fi +if ! gh repo set-default --view > /dev/null 2>&1; then + echo "X No default remote repository has been set." >&2 + echo "please run \`gh repo set-default\` to select a default remote repository." >&2 + exit 1 +fi + # Store original branch original_branch=$(git branch --show-current) diff --git a/dot_local/bin/executable_gh-release.sh b/dot_local/bin/executable_gh-release.sh index 581a67b..cdc060c 100755 --- a/dot_local/bin/executable_gh-release.sh +++ b/dot_local/bin/executable_gh-release.sh @@ -1,6 +1,12 @@ #!/bin/sh set -eux +if ! gh repo set-default --view > /dev/null 2>&1; then + echo "X No default remote repository has been set." >&2 + echo "please run \`gh repo set-default\` to select a default remote repository." >&2 + exit 1 +fi + prerelease_flag="" git_tag_inc_args=""