Просмотр исходного кода

fix(netdata-updater.sh): ensure `--non-interactive` flag is passed during self-update (#18786)

Ilya Mashchenko 5 месяцев назад
Родитель
Сommit
d8c5963e0b
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      packaging/installer/netdata-updater.sh

+ 3 - 1
packaging/installer/netdata-updater.sh

@@ -590,7 +590,9 @@ self_update() {
       export ENVIRONMENT_FILE="${ENVIRONMENT_FILE}"
       export ENVIRONMENT_FILE="${ENVIRONMENT_FILE}"
       force_update=""
       force_update=""
       [ "$NETDATA_FORCE_UPDATE" = "1" ] && force_update="--force-update"
       [ "$NETDATA_FORCE_UPDATE" = "1" ] && force_update="--force-update"
-      exec ./netdata-updater.sh --not-running-from-cron --no-updater-self-update "$force_update" --tmpdir-path "$(pwd)"
+      interactive=""
+      [ "$INTERACTIVE" = "0" ] && interactive="--non-interactive"
+      exec ./netdata-updater.sh --not-running-from-cron --no-updater-self-update "$force_update" "$interactive" --tmpdir-path "$(pwd)"
     else
     else
       error "Failed to download newest version of updater script, continuing with current version."
       error "Failed to download newest version of updater script, continuing with current version."
     fi
     fi