mirror of
https://github.com/Horizontal42/netsleuth.git
synced 2026-11-11 02:12:04 +03:00
cli: remember ndt7 consent in a cache marker so repeat runs stop re-prompting
This commit is contained in:
parent
168cd14f51
commit
286e684d41
1 changed files with 9 additions and 3 deletions
|
|
@ -448,8 +448,14 @@ def run(
|
|||
tcp_trace=tcp_trace,
|
||||
)
|
||||
if ndt7:
|
||||
consent_marker = Path(settings.output.cache_dir) / "ndt7_consent"
|
||||
if not consent_marker.exists():
|
||||
console.print(f"[yellow]{NDT7_CONSENT_NOTICE}[/yellow]")
|
||||
if sys.stdin.isatty() and not typer.confirm("Continue with NDT7?", default=False):
|
||||
if sys.stdin.isatty():
|
||||
if typer.confirm("Continue with NDT7?", default=False):
|
||||
consent_marker.parent.mkdir(parents=True, exist_ok=True)
|
||||
consent_marker.write_text("consented\n", encoding="utf-8")
|
||||
else:
|
||||
options.ndt7 = False
|
||||
if tcp_trace:
|
||||
console.print(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue