diff --git a/scripts/install b/scripts/install index c50a19b..4895382 100644 --- a/scripts/install +++ b/scripts/install @@ -86,9 +86,11 @@ ynh_script_progression --message="Setting up source files..." ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src -git clone $REPOSITORY $final_path --quiet + +install -d -o $app -g $app -m 0750 $final_path +ynh_exec_as $app git clone $REPOSITORY $final_path --quiet pushd "$final_path" - git checkout $COMMIT --quiet + ynh_exec_as $app git checkout $COMMIT --quiet popd chmod 750 "$final_path" @@ -111,7 +113,7 @@ ynh_add_nginx_config ynh_script_progression --message="Building..." pushd "$final_path" - git submodule update --init --recursive + ynh_exec_as $app git submodule update --init --recursive ynh_use_nodejs yarn install --pure-lockfile mkdir "$final_path/dist" diff --git a/scripts/upgrade b/scripts/upgrade index 1ce4c5b..098b184 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -81,9 +81,9 @@ then # Download, check integrity, uncompress and patch the source from app.src pushd "$final_path" - git checkout master - git pull --quiet - git checkout $COMMIT --quiet + ynh_exec_as $app git checkout master + ynh_exec_as $app git pull --quiet + ynh_exec_as $app git checkout $COMMIT --quiet popd fi @@ -119,7 +119,7 @@ ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ st ynh_script_progression --message="Building..." pushd "$final_path" - git submodule update --init --recursive + ynh_exec_as $app git submodule update --init --recursive ynh_use_nodejs yarn install --pure-lockfile $ynh_npm run build