Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid printing on stderr if linter successful #88

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions scripts/test_wrapper
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
#!/bin/bash

set -o pipefail

RESULTS_FILE=$1
TARGET_NAME=${@: -1}
shift

# Run remain args as test command, capturing the output.
LINTER_OUTPUT=$( $@ 2>&1 | tee /dev/stderr )
LINTER_OUTPUT=$( $@ 2>&1 )
mikaelarguedas marked this conversation as resolved.
Show resolved Hide resolved
LINTER_RESULT=$?

mkdir -p `dirname $RESULTS_FILE`
Expand All @@ -22,6 +20,7 @@ ENDXML
exit 0
else
# Lint failed
>&2 echo $LINTER_OUTPUT
mikaelarguedas marked this conversation as resolved.
Show resolved Hide resolved
# TODO: This output could be more helpful; really just a first cut.
cat <<ENDXML > $RESULTS_FILE
<?xml version="1.0" encoding="UTF-8"?>
Expand Down