diff --git a/scripts/install b/scripts/install index 8948f43..86da27c 100644 --- a/scripts/install +++ b/scripts/install @@ -186,12 +186,11 @@ mkdir -p "$final_path/db" chown -R "$app":"$app" "$final_path" pushd $final_path -ynh_use_nodejs -sudo -u $app env PATH=$PATH:$nodejs_path npm install hoek@^4.2.1 --production -#sudo -u $app env PATH=$PATH:$nodejs_path npm install typescript@>=2.0 --save -sudo -u $app env PATH=$PATH:$nodejs_path npm install ts-node --production -sudo -u $app env PATH=$PATH:$nodejs_path npm install --production -sudo -u $app env PATH=$PATH:$nodejs_path npm audit fix + ynh_use_nodejs + sudo -u $app env PATH=$PATH:$nodejs_path npm install hoek@^4.2.1 --production + sudo -u $app env PATH=$PATH:$nodejs_path npm install ts-node --production + sudo -u $app env PATH=$PATH:$nodejs_path npm install --production + sudo -u $app env PATH=$PATH:$nodejs_path npm audit fix popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 77dff4f..4f3d7d9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -134,12 +134,11 @@ mkdir -p "$final_path/db" #================================================= chown -R "$app":"$app" "$final_path" - pushd $final_path -ynh_use_nodejs -sudo -u $app env PATH=$PATH:$nodejs_path npm update --production -sudo -u $app env PATH=$PATH:$nodejs_path npm install --production -sudo -u $app env PATH=$PATH:$nodejs_path npm audit fix + ynh_use_nodejs + sudo -u $app env PATH=$PATH:$nodejs_path npm update --production + sudo -u $app env PATH=$PATH:$nodejs_path npm install --production + sudo -u $app env PATH=$PATH:$nodejs_path npm audit fix popd ### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script.