mirror of
https://github.com/SonarSource/sonarqube-scan-action.git
synced 2025-12-12 09:21:16 +00:00
25 lines
362 B
Bash
Executable file
25 lines
362 B
Bash
Executable file
#!/bin/bash
|
|
|
|
check_status() {
|
|
exit_status=$?
|
|
if [ $exit_status -ne 0 ]; then
|
|
echo "::error::$1"
|
|
exit $exit_status
|
|
fi
|
|
}
|
|
|
|
realpath() {
|
|
case ${RUNNER_OS} in
|
|
Windows)
|
|
cygpath --absolute --windows "$1"
|
|
;;
|
|
Linux)
|
|
readlink -f "$1"
|
|
;;
|
|
macOS)
|
|
# installed by coreutils package
|
|
greadlink -f "$1"
|
|
;;
|
|
esac
|
|
}
|
|
|