mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Patch files earlier to avoid raising an exception is setting folder already exists
This commit is contained in:
parent
7003439c46
commit
f68ae4561f
1 changed files with 11 additions and 11 deletions
|
@ -489,17 +489,17 @@ def app_upgrade(app=[], url=None, file=None):
|
|||
env_dict["YNH_APP_INSTANCE_NAME"] = app_instance_name
|
||||
env_dict["YNH_APP_INSTANCE_NUMBER"] = str(app_instance_nb)
|
||||
|
||||
# Start register change on system
|
||||
related_to = [('app', app_instance_name)]
|
||||
operation_logger = OperationLogger('app_upgrade', related_to, env=env_dict)
|
||||
operation_logger.start()
|
||||
|
||||
# Attempt to patch legacy helpers ...
|
||||
_patch_legacy_helpers(extracted_app_folder)
|
||||
|
||||
# Apply dirty patch to make php5 apps compatible with php7
|
||||
_patch_php5(extracted_app_folder)
|
||||
|
||||
# Start register change on system
|
||||
related_to = [('app', app_instance_name)]
|
||||
operation_logger = OperationLogger('app_upgrade', related_to, env=env_dict)
|
||||
operation_logger.start()
|
||||
|
||||
# Execute App upgrade script
|
||||
os.system('chown -hR admin: %s' % INSTALL_TMP)
|
||||
|
||||
|
@ -695,6 +695,12 @@ def app_install(operation_logger, app, label=None, args=None, no_remove_on_failu
|
|||
# Validate domain / path availability for webapps
|
||||
_validate_and_normalize_webpath(manifest, args_odict, extracted_app_folder)
|
||||
|
||||
# Attempt to patch legacy helpers ...
|
||||
_patch_legacy_helpers(extracted_app_folder)
|
||||
|
||||
# Apply dirty patch to make php5 apps compatible with php7
|
||||
_patch_php5(extracted_app_folder)
|
||||
|
||||
# Prepare env. var. to pass to script
|
||||
env_dict = _make_environment_dict(args_odict)
|
||||
env_dict["YNH_APP_ID"] = app_id
|
||||
|
@ -732,12 +738,6 @@ def app_install(operation_logger, app, label=None, args=None, no_remove_on_failu
|
|||
}
|
||||
_set_app_settings(app_instance_name, app_settings)
|
||||
|
||||
# Attempt to patch legacy helpers ...
|
||||
_patch_legacy_helpers(extracted_app_folder)
|
||||
|
||||
# Apply dirty patch to make php5 apps compatible with php7
|
||||
_patch_php5(extracted_app_folder)
|
||||
|
||||
os.system('chown -R admin: ' + extracted_app_folder)
|
||||
|
||||
# Execute App install script
|
||||
|
|
Loading…
Add table
Reference in a new issue