1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/peertube_ynh.git synced 2024-09-03 19:56:29 +02:00

Specify homedir and yarnrc file for yarn commands

This commit is contained in:
tituspijean 2022-09-11 18:58:23 +02:00
parent 36e908d8cf
commit 0263d9d5c8
No known key found for this signature in database
GPG key ID: EF3B0D7CC0A94720
2 changed files with 12 additions and 4 deletions

View file

@ -160,10 +160,14 @@ chown -R $app:www-data "$datadir"
#================================================= #=================================================
ynh_script_progression --message="Building Yarn dependencies..." 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" pushd "$final_path"
ynh_use_nodejs 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 HOME="$final_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 cache clean
popd popd
#================================================= #=================================================

View file

@ -235,10 +235,14 @@ chown -R $app:www-data "$datadir"
#================================================= #=================================================
ynh_script_progression --message="Building Yarn dependencies..." 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" pushd "$final_path"
ynh_use_nodejs 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 HOME="$final_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 cache clean
popd popd
#================================================= #=================================================