Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

check for interactive session before email prompt #664

Merged
merged 2 commits into from
Aug 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions data_diff/tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def bool_ask_for_email() -> bool:
"""
Checks the .datadiff.toml profile file for the asked_for_email key

Returns False immediately if --no-tracking
Returns False immediately if --no-tracking or not in an interactive terminal

If found, return False (already asked for email)

Expand All @@ -51,7 +51,8 @@ def bool_ask_for_email() -> bool:
Returns:
bool: decision on whether to prompt the user for their email
"""
if g_tracking_enabled:
console = get_console()
if g_tracking_enabled and console.is_interactive:
profile = _load_profile()

if "asked_for_email" not in profile:
Expand Down