From a50c134e12da416fcb51e92d775ac728b1475b77 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 8 Aug 2020 20:44:31 +0200 Subject: [PATCH] implement new nodejs helper --- conf/.env | 2 +- scripts/install | 6 +++--- scripts/upgrade | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/conf/.env b/conf/.env index 93c632a..8b369ef 100644 --- a/conf/.env +++ b/conf/.env @@ -1,5 +1,5 @@ # The path to NODEJS -PATH=__NODEJS_PATH__ +PATH=__YNH_NODE_LOAD_PATH__ # The port used by the application PORT=__PORT__ diff --git a/scripts/install b/scripts/install index dada785..d4d0937 100644 --- a/scripts/install +++ b/scripts/install @@ -129,13 +129,13 @@ chown -R "$app":"$app" "$final_path" pushd $final_path ynh_use_nodejs - sudo -u $app env PATH=$PATH npm install --ignore-scripts - sudo -u $app env PATH=$PATH npm run build + sudo -u $app $ynh_node_load_PATH $ynh_npm install --ignore-scripts + sudo -u $app $ynh_node_load_PATH $ynh_npm run build cp package* dist/ popd pushd $final_path/dist - sudo -u $app env PATH=$PATH npm install --ignore-scripts --production + sudo -u $app $ynh_node_load_PATH $ynh_npm install --ignore-scripts --production popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 27f9195..8d8b1d9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -141,13 +141,13 @@ chown -R "$app":"$app" "$final_path" pushd $final_path ynh_use_nodejs - sudo -u $app env PATH=$PATH npm install --ignore-scripts - sudo -u $app env PATH=$PATH npm run build + sudo -u $app $ynh_node_load_PATH $ynh_npm install --ignore-scripts + sudo -u $app $ynh_node_load_PATH $ynh_npm run build cp package* dist/ popd pushd $final_path/dist - sudo -u $app env PATH=$PATH npm install --ignore-scripts --production + sudo -u $app $ynh_node_load_PATH $ynh_npm install --ignore-scripts --production popd #=================================================