diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e14dfb..c2dd2f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,8 @@ - No new Star Trek references. #### 1.7.4 -- (**Featureish**) `./gravity-sync.sh dev` will now toggle dev flag on/off. No `touch` required, although it still works that way under the covers. Improvement of methods added in 1.7.2. +- `./gravity-sync.sh dev` will now toggle dev flag on/off. No `touch` required, although it still works that way under the covers. Improvement of methods added in 1.7.2. +- `./gravity-sync.sh dev` performs better error handling. - Slightly less verbose in some places to make up for being more verbose in others. - [DONE] has become [ OK ] in output. - Tighten up verbage of some status messages. diff --git a/gravity-sync.sh b/gravity-sync.sh index 2e8c44e..7866537 100755 --- a/gravity-sync.sh +++ b/gravity-sync.sh @@ -114,15 +114,15 @@ function update_gs { MESSAGE="Requires GitHub Installation" echo_warn exit_nochange - elif [ $GIT_CHECK == "HEAD" ] - then - git fetch --all - git reset --hard origin/${BRANCH} else MESSAGE="This might break..." echo_warn - git fetch --all - git reset --hard origin/${BRANCH} + MESSAGE="Updating Cache" + echo_stat + git fetch --all >/dev/null 2>&1 + error_validate + git reset --hard origin/${BRANCH} >/dev/null 2>&1 + error_validate fi exit