From ba7acb85a043a7285cb9e55b3050ed8b8d212f86 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Thu, 17 Nov 2022 12:32:36 -0800 Subject: [PATCH] scripts/git: print when stuff is not setup --- scripts/git-send-nostr | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/git-send-nostr b/scripts/git-send-nostr index f9c3a3e..68fd952 100755 --- a/scripts/git-send-nostr +++ b/scripts/git-send-nostr @@ -70,13 +70,17 @@ json=$(nostril --envelope $sec --kind 19691228 --tag author "$author" --tag subj id=$(jq -r '.[1].id' <<<"$json") if [ -n "$dryrun" ]; then - printf "DRY RUN. printing event data\n\n" >&2 echo "$json" + printf "\nDRY RUN. printing event data\n" >&2 elif [ -z "$relay" ]; then - printf "RELAY NOT SET, not relaying.\n\n" >&2 echo "$json" + printf "\nRELAY NOT SET, not relaying. Use -r wss://relay.damus.io or 'git config --global nostr.relays wss://relay.damus.io'\n" >&2 else echo "$id" printf "relaying to $relay using $NOSTR_RELAYER...\n" >&2 <<<$json $NOSTR_RELAYER "$relay" fi + +if [[ $sec == "" ]]; then + printf "NOSTR SECRET KEY NOT SET, using random key. Use --sec or 'git config --global nostr.secretkey '\n" >&2 +fi