exit on an empty secret

Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
2026-11-27 22:06:04 +00:00
parent f03efa76f1
commit 3892b34e4a
+2
View File
@@ -278,6 +278,8 @@ get_token() {
if get_api_status <<< "$api_response"; then
secret=$(jq -r '.data.token' <<< "$api_response")
[[ $secret ]] || return 1
printf 'export secret="%s"' "$secret" >> "$cfg_file"
chmod 600 "$cfg_file"
printf 'Done\n'