You've already forked docker-mailserver
mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-08 23:06:49 +02:00
ci: fix ShellCheck linting for BATS tests (#3347)
* updated `lint.sh` to lint BATS (again) * fix linting errors
This commit is contained in:
@ -179,12 +179,12 @@ function _should_restart_when_killed() {
|
||||
function _check_if_process_is_running() {
|
||||
local PROCESS=${1}
|
||||
local MIN_SECS_RUNNING
|
||||
[[ -n ${2} ]] && MIN_SECS_RUNNING="--older ${2}"
|
||||
[[ -n ${2:-} ]] && MIN_SECS_RUNNING=('--older' "${2}")
|
||||
|
||||
local IS_RUNNING=$(docker exec "${CONTAINER_NAME}" pgrep --list-full ${MIN_SECS_RUNNING} "${PROCESS}")
|
||||
local IS_RUNNING=$(docker exec "${CONTAINER_NAME}" pgrep --list-full "${MIN_SECS_RUNNING[@]}" "${PROCESS}")
|
||||
|
||||
# When no matches are found, nothing is returned. Provide something we can assert on (helpful for debugging):
|
||||
if [[ ! ${IS_RUNNING} =~ "${PROCESS}" ]]
|
||||
if [[ ! ${IS_RUNNING} =~ ${PROCESS} ]]
|
||||
then
|
||||
echo "'${PROCESS}' is not running"
|
||||
return 1
|
||||
|
Reference in New Issue
Block a user