Skip to content

Commit

Permalink
feat: add force flag to uninstall-app from site
Browse files Browse the repository at this point in the history
  • Loading branch information
gavindsouza committed Jun 30, 2020
1 parent f431042 commit a20d340
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frappe/commands/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,15 +415,16 @@ def remove_from_installed_apps(context, app):
@click.option('--yes', '-y', help='To bypass confirmation prompt for uninstalling the app', is_flag=True, default=False, multiple=True)
@click.option('--dry-run', help='List all doctypes that will be deleted', is_flag=True, default=False)
@click.option('--no-backup', help='Do not backup the site', is_flag=True, default=False)
@click.option('--force', help='Force remove app from site', is_flag=True, default=False)
@pass_context
def uninstall(context, app, dry_run=False, yes=False, no_backup=False):
def uninstall(context, app, dry_run, yes, no_backup, force):
"Remove app and linked modules from site"
from frappe.installer import remove_app
for site in context.sites:
try:
frappe.init(site=site)
frappe.connect()
remove_app(app, dry_run, yes, no_backup)
remove_app(app_name=app, dry_run=dry_run, yes=yes, no_backup=no_backup, force=force)
finally:
frappe.destroy()
if not context.sites:
Expand Down

0 comments on commit a20d340

Please sign in to comment.