mirror of
https://github.com/SonarSource/sonarqube-scan-action.git
synced 2025-12-12 17:31:15 +00:00
14 lines
No EOL
256 B
Bash
Executable file
14 lines
No EOL
256 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -eou pipefail
|
|
|
|
error() { echo -e "\\e[31m✗ $*\\e[0m"; }
|
|
|
|
scriptDir=$(dirname -- "$(readlink -f -- "${BASH_SOURCE[0]}")")
|
|
|
|
$scriptDir/assertFileExists "$1"
|
|
|
|
if ! grep -q "$2" "$1"; then
|
|
error "'$2' not found in '$1'"
|
|
exit 1
|
|
fi |