1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/trilium_ynh.git synced 2024-10-01 13:34:49 +02:00

Fix Node build

This commit is contained in:
Jules Bertholet 2021-04-27 19:49:44 -04:00
parent c6a8fcadf9
commit fc43f59fe1

View file

@ -20,11 +20,12 @@ function set_node_vars {
function build_node_app { function build_node_app {
set_node_vars set_node_vars
cat >> "$final_path/package.json" <<< "$(grep electron $final_path/package.json)" grep -v electron "$final_path/package.json" > "$final_path/server-package.json"
mv "$final_path/server-package.json" "$final_path/package.json"
pushd "$final_path" pushd "$final_path"
chown -R $app:$app "$final_path" chown -R $app:$app "$final_path"
sudo -u $app touch "$final_path/.yarnrc" sudo -u $app touch "$final_path/.yarnrc"
sudo -u $app "env PATH=$node_path" yarn --cache-folder "$final_path/yarn-cache" --use-yarnrc "$final_path/.yarnrc" install --production 2>&1 sudo -u $app env "PATH=$node_path" yarn --cache-folder "$final_path/yarn-cache" --use-yarnrc "$final_path/.yarnrc" install --production 2>&1
chown -R root:root "$final_path" chown -R root:root "$final_path"
popd popd