Skip to content
This repository was archived by the owner on Dec 8, 2022. It is now read-only.

Commit 1cb2944

Browse files
committed
CLI: show confirmation prompt when using 'flask q sync'
1 parent e683d8f commit 1cb2944

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

CodeChallenge/cli/questions.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ def q_replace(title, answer, rank, asset):
9191
def q_sync():
9292
"""Sync with a public Google Sheets Spreadsheet"""
9393

94+
click.confirm("Are you sure you want to sync with the current database? "
95+
f"({db.engine.url.username}@{db.engine.url.host}/{db.engine.url.database})", abort=True)
96+
9497
key = current_app.config.get("GOOGLE_API_KEY")
9598
file_id = current_app.config.get("SHEET_ID")
9699

0 commit comments

Comments
 (0)