From dfc54e2a59819fcd683b3624f33626c771d7730f Mon Sep 17 00:00:00 2001 From: Ellis Barnwell Date: Wed, 13 Oct 2021 14:07:08 +0100 Subject: Ensure that origin url is set to what's in settings --- lorrycontroller/readconf.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lorrycontroller/readconf.py b/lorrycontroller/readconf.py index c833645..8f95035 100644 --- a/lorrycontroller/readconf.py +++ b/lorrycontroller/readconf.py @@ -113,6 +113,11 @@ class ReadConfiguration(lorrycontroller.LorryControllerRoute): def update_confgit(self, confdir): logging.info('Updating CONFGIT in %s', confdir) + # First ensure that the confgit repo is using the correct + # upstream source. + url = self.app_settings['confgit-url'] + cliapp.runcmd(['git', 'remote', 'set-url', 'origin', url], cwd=confdir) + # The following sequence makes the working tree mirror # current upstream git repository as closely as possible. -- cgit v1.2.1