diff --git a/scripts/install b/scripts/install index 91ffa96..4fedcd5 100644 --- a/scripts/install +++ b/scripts/install @@ -160,10 +160,14 @@ chown -R $app:www-data "$datadir" #================================================= ynh_script_progression --message="Building Yarn dependencies..." +touch "$final_path/.yarnrc.yml" +chmod 400 "$final_path/.yarnrc.yml" +chown $app:$app "$final_path/.yarnrc.yml" + pushd "$final_path" ynh_use_nodejs - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install --production --pure-lockfile - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn cache clean + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH HOME="$final_path" yarn install --production --pure-lockfile + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH HOME="$final_path" yarn cache clean popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 5f058f4..a26d7b3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -235,10 +235,14 @@ chown -R $app:www-data "$datadir" #================================================= ynh_script_progression --message="Building Yarn dependencies..." +touch "$final_path/.yarnrc.yml" +chmod 400 "$final_path/.yarnrc.yml" +chown $app:$app "$final_path/.yarnrc.yml" + pushd "$final_path" ynh_use_nodejs - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install --production --pure-lockfile - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn cache clean + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH HOME="$final_path" yarn install --production --pure-lockfile + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH HOME="$final_path" yarn cache clean popd #=================================================