Skip to content

Commit ef99782

Browse files
authored
Merge pull request datafold#664 from datafold/LAB-118
check for interactive session before email prompt
2 parents 5532c3e + cff40d8 commit ef99782

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

data_diff/tracking.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def bool_ask_for_email() -> bool:
4242
"""
4343
Checks the .datadiff.toml profile file for the asked_for_email key
4444
45-
Returns False immediately if --no-tracking
45+
Returns False immediately if --no-tracking or not in an interactive terminal
4646
4747
If found, return False (already asked for email)
4848
@@ -51,7 +51,8 @@ def bool_ask_for_email() -> bool:
5151
Returns:
5252
bool: decision on whether to prompt the user for their email
5353
"""
54-
if g_tracking_enabled:
54+
console = get_console()
55+
if g_tracking_enabled and console.is_interactive:
5556
profile = _load_profile()
5657

5758
if "asked_for_email" not in profile:

0 commit comments

Comments
 (0)