mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge pull request #1285 from sagessylu/dev
Add --purge option to "yunohost app remove"
This commit is contained in:
commit
07413e19c0
2 changed files with 9 additions and 3 deletions
|
@ -673,7 +673,11 @@ app:
|
||||||
api: DELETE /apps/<app>
|
api: DELETE /apps/<app>
|
||||||
arguments:
|
arguments:
|
||||||
app:
|
app:
|
||||||
help: App to delete
|
help: App to remove
|
||||||
|
-p:
|
||||||
|
full: --purge
|
||||||
|
help: Also remove all application data
|
||||||
|
action: store_true
|
||||||
|
|
||||||
### app_upgrade()
|
### app_upgrade()
|
||||||
upgrade:
|
upgrade:
|
||||||
|
|
|
@ -1189,12 +1189,13 @@ def dump_app_log_extract_for_debugging(operation_logger):
|
||||||
|
|
||||||
|
|
||||||
@is_unit_operation()
|
@is_unit_operation()
|
||||||
def app_remove(operation_logger, app):
|
def app_remove(operation_logger, app, purge=False):
|
||||||
"""
|
"""
|
||||||
Remove app
|
Remove app
|
||||||
|
|
||||||
Keyword argument:
|
Keyword arguments:
|
||||||
app -- App(s) to delete
|
app -- App(s) to delete
|
||||||
|
purge -- Remove with all app data
|
||||||
|
|
||||||
"""
|
"""
|
||||||
from yunohost.hook import hook_exec, hook_remove, hook_callback
|
from yunohost.hook import hook_exec, hook_remove, hook_callback
|
||||||
|
@ -1232,6 +1233,7 @@ def app_remove(operation_logger, app):
|
||||||
env_dict["YNH_APP_INSTANCE_NAME"] = app
|
env_dict["YNH_APP_INSTANCE_NAME"] = app
|
||||||
env_dict["YNH_APP_INSTANCE_NUMBER"] = str(app_instance_nb)
|
env_dict["YNH_APP_INSTANCE_NUMBER"] = str(app_instance_nb)
|
||||||
env_dict["YNH_APP_MANIFEST_VERSION"] = manifest.get("version", "?")
|
env_dict["YNH_APP_MANIFEST_VERSION"] = manifest.get("version", "?")
|
||||||
|
env_dict["YNH_APP_PURGE"] = purge
|
||||||
operation_logger.extra.update({"env": env_dict})
|
operation_logger.extra.update({"env": env_dict})
|
||||||
operation_logger.flush()
|
operation_logger.flush()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue