Skip to content

Commit 2eb5bcf

Browse files
fix: check for file path
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 7aa1583 commit 2eb5bcf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scripts/create-app-jwt.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ fi
2626

2727
client_id=$1 # Client ID as first argument
2828

29+
# Check if the private key file exists and is readable
30+
if [ ! -f "$2" ] || [ ! -r "$2" ]; then
31+
echo "Error: Private key file '$2' does not exist or is not readable." >&2
32+
exit 1
33+
fi
2934
pem=$( cat "$2" ) # file path of the private key as second argument
3035

3136
now=$(date +%s)

0 commit comments

Comments
 (0)