diff --git a/common/redis-cli-monitor.spec b/common/redis-cli-monitor.spec index 1f23b93..5126042 100644 --- a/common/redis-cli-monitor.spec +++ b/common/redis-cli-monitor.spec @@ -10,7 +10,7 @@ Summary: Tiny Redis client for renamed MONITOR commands Name: redis-cli-monitor -Version: 2.0.0 +Version: 2.0.1 Release: 0%{?dist} Group: Applications/System License: EKOL @@ -57,6 +57,9 @@ rm -rf %{buildroot} ############################################################################### %changelog +* Thu Jul 06 2017 Anton Novojilov - 2.0.1-0 +- Fixed bug with handling redis errors + * Sun Jul 02 2017 Anton Novojilov - 2.0.0-0 - Added colors and timestamp formatting - Added option for enabling raw output diff --git a/readme.md b/readme.md index 69f86b6..0a80a89 100644 --- a/readme.md +++ b/readme.md @@ -75,10 +75,10 @@ Examples ### Build Status -| Repository | Status | -|------------|--------| -| Stable | [![Build Status](https://travis-ci.org/essentialkaos/redis-cli-monitor.svg?branch=master)](https://travis-ci.org/essentialkaos/redis-cli-monitor) | -| Unstable | [![Build Status](https://travis-ci.org/essentialkaos/redis-cli-monitor.svg?branch=develop)](https://travis-ci.org/essentialkaos/redis-cli-monitor) | +| Branch | Status | +|--------|--------| +| `master` | [![Build Status](https://travis-ci.org/essentialkaos/redis-cli-monitor.svg?branch=master)](https://travis-ci.org/essentialkaos/redis-cli-monitor) | +| `develop` | [![Build Status](https://travis-ci.org/essentialkaos/redis-cli-monitor.svg?branch=develop)](https://travis-ci.org/essentialkaos/redis-cli-monitor) | ### License diff --git a/redis-cli-monitor.go b/redis-cli-monitor.go index 5c65b5e..b192c3c 100644 --- a/redis-cli-monitor.go +++ b/redis-cli-monitor.go @@ -28,7 +28,7 @@ import ( const ( APP = "Redis CLI Monitor" - VER = "2.0.0" + VER = "2.0.1" DESC = "Tiny Redis client for renamed MONITOR commands" ) @@ -157,6 +157,10 @@ func monitor(cmd string) { continue } + if strings.HasPrefix(str, "-ERR ") { + printErrorAndExit("Redis return error message: " + strings.TrimRight(str[1:], "\r\n")) + } + if useRawOutput { fmt.Printf("%s", str[1:]) } else {