Skip to content

Commit

Permalink
verdi node delete: Add verbose list of pks to be deleted (aiidateam…
Browse files Browse the repository at this point in the history
…#5878)

The `verdi node delete` command provided no way to a user to introspect
which pks would be deleted, just the total number of nodes. A log
message on the INFO level is added with the full list of pks to be
deleted. A user can use the `-v info` option to print it.
  • Loading branch information
sphuber authored Jan 31, 2023
1 parent e03a3e1 commit b874e41
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions aiida/cmdline/commands/cmd_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ def _dry_run_callback(pks):
if not pks or force:
return False
echo.echo_warning(f'YOU ARE ABOUT TO DELETE {len(pks)} NODES! THIS CANNOT BE UNDONE!')
echo.echo_info('The nodes with the following pks would be deleted: ' + ' '.join(map(str, pks)))
return not click.confirm('Shall I continue?', abort=True)

_, was_deleted = delete_nodes(pks, dry_run=dry_run or _dry_run_callback, **traversal_rules)
Expand Down

0 comments on commit b874e41

Please sign in to comment.