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 }