hf : add error logs
This commit is contained in:
parent
303da63442
commit
e834aa1fd4
1 changed files with 3 additions and 2 deletions
|
@ -29,7 +29,7 @@ if has_cmd wget; then
|
||||||
elif has_cmd curl; then
|
elif has_cmd curl; then
|
||||||
cmd="curl -C - -f -o %s -L %s"
|
cmd="curl -C - -f -o %s -L %s"
|
||||||
else
|
else
|
||||||
print "Error: curl or wget not found"
|
log "[E] curl or wget not found"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ while [[ $# -gt 0 ]]; do
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -z "$url" ]; then
|
if [ -z "$url" ]; then
|
||||||
log "Error: missing --url"
|
log "[E] missing --url"
|
||||||
usage
|
usage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -67,6 +67,7 @@ if [[ ${#url} -gt 22 ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$is_url" = false ]; then
|
if [ "$is_url" = false ]; then
|
||||||
|
log "[E] invalid URL, must start with https://huggingface.co"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue