Community
OpenEnergyMonitor

Community

Errors during updates

There have been a number of problems recently that have resulted from git errors during the update process.

@TrystanLea, can the update script be amended such that if the pulls from either the emonpi repo, or the emoncms repo fail, the update process aborts with a clear message to the user.

1 Like

Sure , do you know of the best way to do this?

Testing the simple approach here (https://stackoverflow.com/questions/26771612/test-to-determine-if-git-clone-command-succeeded) seems to work ok if I disable/enable internet while running git clone or git pull:

if ! git pull
then
  echo "Failed"
else
  echo "Successful"
fi

Short answer - no!!

Seems like a reasonable approach.

If you edit a file so the merge cannot be done, does that fail as well? This is the most common scenario.