From cf2f23d747ef93228f67d2fde34716794877e4ae Mon Sep 17 00:00:00 2001 From: kenjones Date: Fri, 22 Sep 2017 23:58:50 -0400 Subject: [PATCH] Bugfix: Resolve failing acceptance test --- scripts/acceptance.sh | 3 +-- scripts/xcompile.sh | 1 - yaml.go | 1 + 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/acceptance.sh b/scripts/acceptance.sh index 4fc9ca59..83804f42 100755 --- a/scripts/acceptance.sh +++ b/scripts/acceptance.sh @@ -5,8 +5,7 @@ set -e # acceptance test X=$(./bin/yaml w ./examples/sample.yaml b.c 3 | ./bin/yaml r - b.c) -if [ $X != 3 ] - then +if [[ $X != 3 ]]; then echo "Failed acceptance test: expected 2 but was $X" exit 1 fi diff --git a/scripts/xcompile.sh b/scripts/xcompile.sh index 34777126..db6fe349 100755 --- a/scripts/xcompile.sh +++ b/scripts/xcompile.sh @@ -3,6 +3,5 @@ # This assumes that gonative and gox is installed as per the 'one time setup' instructions # at https://github.com/inconshreveable/gonative -rm build/* gox -output="build/{{.Dir}}_{{.OS}}_{{.Arch}}" diff --git a/yaml.go b/yaml.go index a425e4ac..54fd9ee1 100644 --- a/yaml.go +++ b/yaml.go @@ -53,6 +53,7 @@ func newCommandCLI() *cobra.Command { rootCmd.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "verbose mode") rootCmd.AddCommand(createReadCmd(), createWriteCmd(), createNewCmd()) + rootCmd.SetOutput(os.Stdout) return rootCmd }