From c58e986a8732e55ed4c50be4a6fc85f14c3abce4 Mon Sep 17 00:00:00 2001 From: Akhil Narang Date: Thu, 28 Mar 2024 12:18:32 +0530 Subject: [PATCH] chore: check whether we're in an interactive session or not Signed-off-by: Akhil Narang --- frappe/commands/site.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/commands/site.py b/frappe/commands/site.py index 55287d647c..9c13d085f5 100644 --- a/frappe/commands/site.py +++ b/frappe/commands/site.py @@ -100,7 +100,7 @@ def new_site( use(site) except Exception: - if click.confirm("Do you want to rollback the failed site?", abort=True): + if sys.__stdin__.isatty() and click.confirm("Do you want to rollback the failed site?", abort=True): rollback_callback.run()