From cc167cd92c60b70c75c89da7e18d35b767aafa1e Mon Sep 17 00:00:00 2001
From: tituspijean <tituspijean@outlook.com>
Date: Wed, 24 May 2023 21:11:32 +0000
Subject: [PATCH] Rename ynh_load_app_environment into ynh_spawn_app_shell

Co-authored-by: Florent <florent.git@zeteo.me>
---
 helpers/apps | 8 ++++----
 src/app.py   | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/helpers/apps b/helpers/apps
index d807a4d87..fb5ac25b0 100644
--- a/helpers/apps
+++ b/helpers/apps
@@ -118,11 +118,11 @@ ynh_remove_apps() {
 #     | arg: -a, --app=     - the app ID
 #
 # examples:
-#   ynh_load_app_environment --app="APP" <<< 'echo "$USER"'
-#   ynh_load_app_environment --app="APP" < /tmp/some_script.bash
-# 
+#   ynh_spawn_app_shell --app="APP" <<< 'echo "$USER"'
+#   ynh_spawn_app_shell --app="APP" < /tmp/some_script.bash
+#
 # Requires YunoHost version 11.0.* or higher.
-ynh_load_app_environment() {
+ynh_spawn_app_shell() {
         # Declare an array to define the options of this helper.
         local legacy_args=a
         local -A args_array=([a]=app=)
diff --git a/src/app.py b/src/app.py
index 6b523d574..04340b1ba 100644
--- a/src/app.py
+++ b/src/app.py
@@ -1653,7 +1653,7 @@ def app_shell(app):
         app -- App ID
 
     """
-    subprocess.run(['/bin/bash', '-c', 'source /usr/share/yunohost/helpers && ynh_load_app_environment '+app])
+    subprocess.run(['/bin/bash', '-c', 'source /usr/share/yunohost/helpers && ynh_spawn_app_shell '+app])
 
 def app_register_url(app, domain, path):
     """