File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 55
66if [ -z " $BASH_VERSION " ]; then
77 if command -v bash > /dev/null 2>&1 ; then
8- if [ -f " $0 " ] && [ " $0 " != " sh" ]; then
8+ if [ -f " $0 " ] && [ " $0 " != " sh" ] && [ " $0 " != " bash " ] ; then
99 exec bash " $0 " " $@ "
1010 else
1111 tmp_dir=$( mktemp -d 2> /dev/null || mktemp -d -t hf-cli-install)
1212 tmp_script=" $tmp_dir /install.sh"
1313 cat > " $tmp_script "
1414 chmod +x " $tmp_script "
1515 bash " $tmp_script " " $@ "
16- status =$?
16+ exit_code =$?
1717 rm -rf " $tmp_dir "
18- exit $status
18+ exit $exit_code
1919 fi
2020 else
2121 echo " [ERROR] bash is required to run this installer." >&2
22+ echo " [ERROR] Please run: curl -LsSf https://hf.co/cli/install.sh | bash" >&2
2223 exit 1
2324 fi
2425fi
@@ -299,7 +300,7 @@ install_hf_hub() {
299300 fi
300301
301302 if [ " ${HF_CLI_VERBOSE_PIP:- } " != " 1" ]; then
302- log_info " ( pip output suppressed; set HF_CLI_VERBOSE_PIP=1 for full logs) "
303+ log_info " pip output suppressed; set HF_CLI_VERBOSE_PIP=1 for full logs"
303304 fi
304305
305306 if [ -n " $extra_pip_args " ]; then
You can’t perform that action at this time.
0 commit comments