diff --git a/scripts/install b/scripts/install index c7a97fa..91f8b3a 100755 --- a/scripts/install +++ b/scripts/install @@ -45,8 +45,8 @@ ynh_script_progression --message="Building app... (this will take some time and pushd "$install_dir" ynh_use_nodejs - ynh_exec_warn_less npm i -g npm - ynh_exec_warn_less npm install --production + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm i -g npm + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm install --production popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 0653676..a9e2a59 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -60,8 +60,8 @@ ynh_script_progression --message="Building app... (this will take some time and pushd "$install_dir" ynh_use_nodejs - ynh_exec_warn_less npm i -g npm - ynh_exec_warn_less npm install --production + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm i -g npm + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm install --production popd #=================================================