triggerfail

module
v0.0.0-...-9b3657e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2016 License: BSD-3-Clause

README

TriggerFail

Build Status

Fail a command with an exit status of 82 if a trigger string appears in it's output. This is incredibly useful for use with testing framworks (such as Travis CI), which will let you fail a test if certain keywords like "Error" or "Warning" appears in it's output.

USAGE
  triggerfail "<space-seperated-strings>" [--abort] [-v] <command>

OPTIONS
  -abort=false: Abort a running command if a match is found. If abort is not passed the command is allowed to run to completion
  -v=false: Verbose. Print the reason why we failed the command.

EXAMPLE
  triggerfail --abort -v --stderr "Error Warning" mysqldump my_database > mysqlbackup.sql #Abort a running mysqldump if we encounter a warning or error.

####Downloads

Building From Source
sudo apt-get install golang                    # Download go. Alternativly build from source: https://golang.org/doc/install/source
mkdir ~/.gopath && export GOPATH=~/.gopath     # Replace with desired GOPATH
export PATH=$PATH:$GOPATH/bin                  # For convenience, add go's bin dir to your PATH
go get github.com/phayes/triggerfail/cmd/triggerfail

Directories

Path Synopsis
cmd
triggerfail command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL