Skip to content

Commit 55abd38

Browse files
[CLI] Respect HF_DEBUG environment variable (#3562)
* set verbosity to debug when HF_DEBUG is set to True * style
1 parent 2143229 commit 55abd38

File tree

1 file changed

+3
-1
lines changed
  • src/huggingface_hub/cli

1 file changed

+3
-1
lines changed

src/huggingface_hub/cli/hf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515

16+
from huggingface_hub import constants
1617
from huggingface_hub.cli._cli_utils import check_cli_update, typer_factory
1718
from huggingface_hub.cli.auth import auth_cli
1819
from huggingface_hub.cli.cache import cache_cli
@@ -51,7 +52,8 @@
5152

5253

5354
def main():
54-
logging.set_verbosity_info()
55+
if not constants.HF_DEBUG:
56+
logging.set_verbosity_info()
5557
check_cli_update()
5658
app()
5759

0 commit comments

Comments
 (0)