diff --git a/httpie/core.py b/httpie/core.py index d7016bac..c90452a0 100644 --- a/httpie/core.py +++ b/httpie/core.py @@ -72,7 +72,6 @@ def raw_main( return ExitStatus.SUCCESS exit_status = ExitStatus.SUCCESS - check_updates(env) try: parsed_args = parser.parse_args( @@ -96,6 +95,7 @@ def raw_main( raise exit_status = ExitStatus.ERROR else: + check_updates(env) try: exit_status = main_program( args=parsed_args, diff --git a/httpie/internal/update_warnings.py b/httpie/internal/update_warnings.py index 31da8846..9c8fd4c1 100644 --- a/httpie/internal/update_warnings.py +++ b/httpie/internal/update_warnings.py @@ -7,7 +7,7 @@ from typing import Any, Optional, Callable import requests import httpie -from httpie.context import Environment, Levels +from httpie.context import Environment, LogLevel from httpie.internal._build_channel import BUILD_CHANNEL from httpie.internal.daemons import spawn_daemon from httpie.utils import is_version_greater, open_with_lockfile @@ -164,7 +164,7 @@ def check_updates(env: Environment) -> None: if current_date < earliest_warn_date: return None - env.log_error(update_status, level=Levels.WARNING) + env.log_error(update_status, level=LogLevel.INFO) version_info['last_warned_date'] = current_date.isoformat() with open_with_lockfile(file, 'w') as stream: