# Errors during updates

**URL:** <https://community.openenergymonitor.org/t/errors-during-updates/12770>\
**Category:** Installation\
**Created:** [18 December 2019 11:22 UTC](https://community.openenergymonitor.org/t/errors-during-updates/12770 "2019-12-18T11:22:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![borpin](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/borpin/32/193_2.png) [@borpin](https://community.openenergymonitor.org/u/borpin)\
**Post date:** [18 December 2019 11:22 UTC](https://community.openenergymonitor.org/t/errors-during-updates/12770/1 "2019-12-18T11:22:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![TrystanLea](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/trystanlea/32/31_2.png) [@TrystanLea](https://community.openenergymonitor.org/u/TrystanLea)\
**Post date:** [19 December 2019 17:13 UTC](https://community.openenergymonitor.org/t/errors-during-updates/12770/2 "2019-12-19T17:13:28Z")

</div>

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

Testing the simple approach here ([bash - Test to determine if git clone command succeeded - Stack Overflow](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
```

---

<div class="post-metadata">

**Author:** ![borpin](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/borpin/32/193_2.png) [@borpin](https://community.openenergymonitor.org/u/borpin)\
**Post date:** [19 December 2019 19:59 UTC](https://community.openenergymonitor.org/t/errors-during-updates/12770/3 "2019-12-19T19:59:39Z")

</div>

> [@TrystanLea](#):
>
> do you know of the best way to do this?

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.
