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
This commit is contained in:
parent
101926a8bc
commit
90c9e21ac4
5
sndev
5
sndev
|
@ -318,6 +318,11 @@ USAGE
|
|||
|
||||
sndev__login() {
|
||||
shift
|
||||
if [ -z "$1" ]; then
|
||||
echo "<nym> 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
|
||||
|
|
Loading…
Reference in New Issue