Put confirmation in right spot for record command

This commit is contained in:
Jacob Hinkle 2022-10-11 13:48:21 -04:00
parent c3dd418c8c
commit cf926658ee

View File

@ -49,14 +49,15 @@ def record(
if show_diff:
print_diff(fsdiff, show_hashes=show_hashes, use_color=use_color)
logger.info("Recording with message: {}", message)
if skip_confirm or confirm(f"Record to {s.db_path}?"):
if skip_confirm or confirm(
f'Record to "{s.db_path}" with message "{message}"?'
):
# descend the diff, tracking parent filedir IDs, creating them and
# recording new versions of each, when necessary
logger.info("Recording with message: {}", message)
fsdiff.persist(cur=cur, source_task=task)
else:
logger.info("Cancelled!")
logger.warning("Cancelled!")
sys.exit(1)