Skip to content

Commit

Permalink
feat: add try\except of get_whoami
Browse files Browse the repository at this point in the history
  • Loading branch information
Romazes committed Aug 15, 2024
1 parent 9eee6b4 commit 09119a6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lean/click.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,10 @@ def _parse_verbose_option(ctx: Context, param: Parameter, value: Optional[bool])
f" .NET version: {dotnet_version}\n"
f" VS Code version: {vscode_version}\n"
f" VS Code installed versions: {vscode_installed_extensions}")

logger.debug(get_whoami_message())
try:
logger.debug(get_whoami_message())
except:
logger.debug("Unable to retrieve login information. The user might not be logged in.")


def verbose_option() -> Callable[[FC], FC]:
Expand Down

0 comments on commit 09119a6

Please sign in to comment.