Only try to update repo metadata in updater script if needed. (#13009)
Austin S. Hemmelgarn committed
May 27, 2022 at 07:02 UTC
6c3a13d0109895fadc0385c686c9b0455fdf1947
1 file changed
+3
-1
packaging/installer/netdata-updater.sh
+3
-1
@@ -772,7 +772,9 @@ update_binpkg() {
772
# shellcheck disable=SC2086
773
env ${env} ${pm_cmd} ${upgrade_cmd} ${pkg_install_opts} ${repopkg} || fatal "Failed to update Netdata repository config." U000D
774
# shellcheck disable=SC2086
775
- env ${env} ${pm_cmd} ${repo_subcmd} ${repo_update_opts} || fatal "Failed to update repository metadata." U000E
775
+ if [ -n "${repo_subcmd}" ]; then
776
+ env ${env} ${pm_cmd} ${repo_subcmd} ${repo_update_opts} || fatal "Failed to update repository metadata." U000E
777
+ fi
778
fi
779
done
780