blob: 6ed75429fcda54550f74e1cff6d3d49cd21c6a7c [file] [log] [blame]
parameters:
rust_version: ''
steps:
- bash: |
if [[ "$RUST_VERSION" == nightly* ]]; then
export RUSTFLAGS='--cap-lints=warn'
(${{ parameters.bash }}) 2>&1 | tee log
export EXIT_CODE=${PIPESTATUS[0]}
echo "The exit code is $EXIT_CODE"
if grep -q "warning:" log; then
echo -e "\043#vso[task.logissue type=warning;]${{ parameters.displayName}} contains new warnings"
fi
if [[ $EXIT_CODE -eq 0 ]]; then
true
else
false
fi
else
${{ parameters.bash }}
fi
displayName: ${{ parameters.displayName }}
env:
RUST_BACKTRACE: 1
RUST_VERSION: ${{parameters.rust_version}}
condition: |
or(
startsWith(variables['parameters.rust_version'], 'nightly'),
succeeded()
)