sonarqube-scan-action/test/assertFileContains

10 lines
147 B
Plaintext
Raw Normal View History

2024-12-11 10:03:13 +00:00
#!/bin/bash
error() { echo -e "\\e[31m✗ $*\\e[0m"; }
assertFileExists $1
if ! grep -q $2 $1; then
error "'$2' not found in '$1'"
exit 1
fi