From 8dcdb4d58111e542e51e7400fd6e3eb06da4d499 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 21 May 2022 19:06:53 +0300 Subject: [PATCH] * run git under 'app' when updating local plugins on startup * only try to update actual git repositories in plugins.local/ --- src/app/startup.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/app/startup.sh b/src/app/startup.sh index 14b8f2c..79e7373 100755 --- a/src/app/startup.sh +++ b/src/app/startup.sh @@ -50,12 +50,14 @@ if [ -z "$TTRSS_NO_STARTUP_PLUGIN_UPDATES" ]; then echo updating all local plugins... find $DST_DIR/plugins.local -mindepth 1 -maxdepth 1 -type d | while read PLUGIN; do - echo updating $PLUGIN... - - cd $PLUGIN && \ - git config core.filemode false && \ - git config pull.rebase false && \ - git pull origin master || echo warning: attempt to update plugin $PLUGIN failed. + if [ -d $PLUGIN/.git ]; then + echo updating $PLUGIN... + + cd $PLUGIN && \ + sudo -u app git config core.filemode false && \ + sudo -u app git config pull.rebase false && \ + sudo -u app git pull origin master || echo warning: attempt to update plugin $PLUGIN failed. + fi done else echo skipping local plugin updates, disabled.