Skip to content

Commit 6378f83

Browse files
Update error message to improve shell compatibility (#3333)
* fix: improve error message for shell compatibility * Apply style fixes --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 8a6d4e3 commit 6378f83

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/huggingface_hub/cli/cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def _inner(*args, **kwargs):
4646
if not _inquirer_py_available:
4747
raise ImportError(
4848
"The 'cache delete' command requires extra dependencies for the TUI.\n"
49-
"Please run 'pip install huggingface_hub[cli]' to install them.\n"
49+
"Please run 'pip install \"huggingface_hub[cli]\"' to install them.\n"
5050
"Otherwise, disable TUI using the '--disable-tui' flag."
5151
)
5252
return fn(*args, **kwargs)

src/huggingface_hub/commands/delete_cache.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
2323
NOTE:
2424
This command is based on `InquirerPy` to build the multiselect menu in the terminal.
25-
This dependency has to be installed with `pip install huggingface_hub[cli]`. Since
25+
This dependency has to be installed with `pip install "huggingface_hub[cli]"`. Since
2626
we want to avoid as much as possible cross-platform issues, I chose a library that
2727
is built on top of `python-prompt-toolkit` which seems to be a reference in terminal
2828
GUI (actively maintained on both Unix and Windows, 7.9k stars).
@@ -88,7 +88,7 @@ def _inner(*args, **kwargs):
8888
if not _inquirer_py_available:
8989
raise ImportError(
9090
"The `delete-cache` command requires extra dependencies to work with"
91-
" the TUI.\nPlease run `pip install huggingface_hub[cli]` to install"
91+
' the TUI.\nPlease run `pip install "huggingface_hub[cli]"` to install'
9292
" them.\nOtherwise, disable TUI using the `--disable-tui` flag."
9393
)
9494

0 commit comments

Comments
 (0)