From 90c9e21ac4912868bec6652c9a1f0a8765e05fdd Mon Sep 17 00:00:00 2001 From: SatsAllDay <128755788+SatsAllDay@users.noreply.github.com> Date: Sat, 23 Mar 2024 21:09:45 -0400 Subject: [PATCH] validate nym arg presence on `./sndev login` command (#956) check to ensure that a nym is provided to the login command before proceeding. if omitted, echo an error message, display the help for the login command, then exit with a non-zero exit code --- sndev | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sndev b/sndev index 4ac0623d..080a3eaa 100755 --- a/sndev +++ b/sndev @@ -318,6 +318,11 @@ USAGE sndev__login() { shift + if [ -z "$1" ]; then + echo " argument required" + sndev__help_login + exit 1 + fi # hardcode token for which is the hex digest of the sha256 of # "SNDEV-TOKEN3_0W_PhDRZVanbeJsZZGIEljexkKoGbL6qGIqSwTjjI" # next-auth concats the token with the secret from env and then sha256's it