Skip to content

Commit

Permalink
fix wc checking non-existent file
Browse files Browse the repository at this point in the history
  • Loading branch information
foxfirecodes committed Nov 28, 2024
1 parent 590a053 commit e54a992
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/fetch-art
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if [ "$content" != "$expected_content" ]; then
fi
fi

if [ "$(wc -c "$img_path" | awk '{print $1}')" -gt 0 ]; then
if [ -f "$img_path" ] && [ "$(wc -c "$img_path" | awk '{print $1}')" -gt 0 ]; then
echo "\${image $img_path -p 0,0 -s 125x125 -n}"
else
echo "\${image ./placeholder.png -p 0,0 -s 125x125}"
Expand Down

0 comments on commit e54a992

Please sign in to comment.