chore: check whether we're in an interactive session or not

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
Akhil Narang 2024-03-28 12:18:32 +05:30
parent 147c0c8b37
commit c58e986a87
No known key found for this signature in database
GPG key ID: 9DCC61E211BF645F

View file

@ -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()