Skip to content

Commit

Permalink
fix: sets default confirmation action to 'No'
Browse files Browse the repository at this point in the history
Certain confirmations had the default action set to True. This would
mean that if someone hits the return key, then it will go ahead and
perform the action. It may lead to unwanted consequences and thus a
risky option to have in the CLI. This commit fixes that.

Wrike Ticket: https://www.wrike.com/open.htm?id=1299312443

(cherry picked from commit 6bb9027)
  • Loading branch information
pallabpain committed Feb 12, 2024
1 parent 1d3c75e commit b3348af
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions riocli/deployment/delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ def delete_deployment(

if not force:
with spinner.hidden():
click.confirm('Do you want to delete the above deployment(s)?',
default=True, abort=True)
click.confirm('Do you want to delete the above deployment(s)?', abort=True)
spinner.write('')

try:
Expand Down
3 changes: 1 addition & 2 deletions riocli/deployment/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ def update_deployment(

if not force:
with spinner.hidden():
click.confirm('Do you want to update above deployment(s)?',
default=True, abort=True)
click.confirm('Do you want to update above deployment(s)?', abort=True)
spinner.write('')

try:
Expand Down
3 changes: 1 addition & 2 deletions riocli/device/delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ def delete_device(

if not force:
with spinner.hidden():
click.confirm('Do you want to delete above device(s)?',
default=True, abort=True)
click.confirm('Do you want to delete above device(s)?', abort=True)
spinner.write('')

try:
Expand Down

0 comments on commit b3348af

Please sign in to comment.