From 219656f849d3b65fb3c1c70b5793967584757a2f Mon Sep 17 00:00:00 2001 From: ezekg Date: Thu, 5 Jan 2017 15:05:59 -0600 Subject: [PATCH] update usage color and exit code --- .travis.yml | 3 --- main.go | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2e20576..47e95b0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,9 +3,6 @@ go: - 1.7.4 - tip sudo: false -before_install: - - export GOPATH="${TRAVIS_BUILD_DIR}/Godeps/_workspace:$GOPATH" - - export PATH="${TRAVIS_BUILD_DIR}/Godeps/_workspace/bin:$PATH" script: - go vet - go test -v diff --git a/main.go b/main.go index b63a43a..e0e6770 100644 --- a/main.go +++ b/main.go @@ -66,8 +66,8 @@ func main() { } out, _ = git.Exec("diff", commit, "--staged") default: - color.Red("Usage:\n git-hound commit [...]\n git-hound sniff [commit]") - os.Exit(1) + fmt.Print("Usage:\n git-hound commit [...]\n git-hound sniff [commit]\n") + os.Exit(0) } fileDiffs, err := diff.ParseMultiFileDiff([]byte(out))