diff --git a/scripts/install b/scripts/install index 7ae0c0d..416fe86 100644 --- a/scripts/install +++ b/scripts/install @@ -62,8 +62,8 @@ setup="{ pushd $install_dir npm install npm@latest --location=global - ynh_exec_as_app node_load_PATH npm install lodash --save - ynh_exec_as_app node_load_PATH $install_dir/nodebb setup "${setup}" 2>/dev/null + ynh_exec_as_app --preserve-env=PATH install lodash --save + ynh_exec_as_app --preserve-env=PATH $install_dir/nodebb setup "${setup}" 2>/dev/null popd diff --git a/scripts/upgrade b/scripts/upgrade index bd0e935..defa2f6 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,12 +20,12 @@ ynh_script_progression "Upgrading source files..." pushd $install_dir # Shut down your forum git config --system --add safe.directory $install_dir - ynh_exec_as_app node_load_PATH $install_dir/nodebb stop + ynh_exec_as_app --preserve-env=PATH $install_dir/nodebb stop # Grab the latest and greatest code git fetch # Grab the latest code from the NodeBB Repository git reset --hard origin/$nodebb_version # Replace v1.12.x with the branch name! # Run the NodeBB upgrade script - ynh_exec_as_app node_load_PATH $install_dir/nodebb upgrade 2>/dev/null + ynh_exec_as_app --preserve-env=PATH $install_dir/nodebb upgrade 2>/dev/null popd chmod -R o-rwx "$install_dir"