Skip to content

Commit 6fd6a9b

Browse files
committed
check for jq
1 parent 5f0303c commit 6fd6a9b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

commands/media/apple-music/apple-music-go-to-artist-page.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,10 @@
1313
# @raycast.argument1 { "type": "text", "placeholder": "artist", "percentEncoded": true}
1414
# @raycast.icon images/apple-music-logo.png
1515

16+
if ! command -v jq &> /dev/null; then
17+
echo "jq is required. Install using Brew";
18+
exit 1;
19+
fi
20+
1621
url=$(curl -s https://itunes.apple.com/search\?term=$1\&entity=musicArtist | jq '.results[0].artistLinkUrl' | sed 's/https/itms/g' | sed 's/"//g')
1722
osascript -e 'on run {myurl}' -e 'open location myurl' -e 'end run' $url

0 commit comments

Comments
 (0)